summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dmtimer.c
Commit message (Collapse)AuthorAgeFilesLines
* OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS insteadTony Lindgren2009-08-281-1/+4
| | | | | | | | | | | Search and replace OMAP_IO_ADDRESS with OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS, and convert omap_read/write into a functions instead of a macros. Also rename OMAP_MPUIO_VBASE to OMAP1_MPUIO_VBASE. In the long run, most code should use ioremap + __raw_read/write instead. Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP4: Add minimal support for omap4Santosh Shilimkar2009-05-281-3/+56
| | | | | | | | | | | | This patch adds the support for OMAP4. The platform and machine specific headers and sources updated for OMAP4430 SDP platform. OMAP4430 is Texas Instrument's SOC based on ARM Cortex-A9 SMP architecture. It's a dual core SOC with GIC used for interrupt handling and SCU for cache coherency. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Remove unwanted type casts and fix the compiler warning.Santosh Shilimkar2009-05-251-7/+7
| | | | | | | | | | | This patch fixes the compiler warning "assignment from incompatible pointer type" in dmtimer.c and removes the tye casts. These warnings were suppressed by type catsing. The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c filesPaul Walmsley2009-04-231-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function omap2_gp_clockevent_set_gptimer() for board-*.c files to use in .init_irq functions to configure the system tick GPTIMER. Practical choices at this point are GPTIMER1 or GPTIMER12. Both of these timers are in the WKUP powerdomain, and so are unaffected by chip power management. GPTIMER1 can use sys_clk as a source, for applications where a high-resolution timer is more important than power management. GPTIMER12 has the special property that it has the secure 32kHz oscillator as its source clock, which may be less prone to glitches than the off-chip 32kHz oscillator. But on HS devices, it may not be available for Linux use. It appears that most boards are fine with GPTIMER1, but BeagleBoard should use GPTIMER12 when using a 32KiHz timer source, due to hardware bugs in revisions B4 and below. Modify board-omap3beagle.c to use GPTIMER12. This patch originally used a Kbuild config option to select the GPTIMER, but was changed to allow this to be specified in board-*.c files, per Tony's request. Kalle Vallo <kalle.valo@nokia.com> found a bug in an earlier version of this patch - thanks Kalle. Tested on Beagle rev B4 ES2.1, with and without CONFIG_OMAP_32K_TIMER, and 3430SDP. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Cc: Kalle Valo <kalle.valo@nokia.com>
* OMAP: dmtimer: enable all timers to be wakeup eventsKevin Hilman2009-04-231-4/+2
| | | | | | | | All GP timers on OMAP2/3 can generate wakeup events. The wakeup status is cleared in the PRCM interrupt handler. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
* OMAP3 GPTIMER: fix GPTIMER12 IRQPaul Walmsley2009-04-231-1/+1
| | | | | | | | | GPTIMER12 IRQ is at IRQ 95 on OMAP3, unlike OMAP2. (ref: OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security Addendum Rev. B, SWPU119B) Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Export dmtimer functionsTimo Kokkonen2009-03-231-0/+26
| | | | | | | | Make the dmtimer function symbols available so modules can take use of them. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP2: skip unnecessary TLDR write during non-autoreload for gptimerPaul Walmsley2008-12-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | The GPTIMER TLDR register does not need to be written if the GPTIMER is not in autoreload mode. This is the usual case for dynamic tick-enabled kernels. Simulation data indicate that skipping the read that occurs as part of the write should save at least 300-320 ns for each GPTIMER1 timer reprogram. (This assumes L4-Wakeup is at 19MHz and GPTIMER write posting is enabled.) Skipping the write itself probably won't have much impact since it should be posted on the OCP interconnect. Tested on 2430SDP and 3430SDP. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Richard Woodruff <r-woodruff2@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP2: drop redundant pending write check for gptimerPaul Walmsley2008-12-101-4/+0
| | | | | | | | | | | | | omap_dm_timer_write_reg() already waits for pending writes to complete, so the extra wait in omap_dm_timer_set_load() is superfluous. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Richard Woodruff <r-woodruff2@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* Merge branch 'omap-all' into develRussell King2008-10-141-1/+1
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/gpmc.c arch/arm/mach-omap2/irq.c
| * [ARM] omap: Fix IO_ADDRESS() macrosRussell King2008-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | OMAP1_IO_ADDRESS(), OMAP2_IO_ADDRESS() and IO_ADDRESS() returns cookies for use with __raw_{read|write}* for accessing registers. Therefore, these macros should return (void __iomem *) cookies, not integer values. Doing this improves typechecking, and means we can find those places where, eg, DMA controllers are incorrectly given virtual addresses to DMA to, or physical addresses are thrown through a virtual to physical address translation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
|/ | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-3/+3
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
| | | | | | | | | Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: DMTimer: Optimize by adding load and startRichard Woodruff2008-07-031-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | This patch optimizes the timer load and start sequence. By combining the load and start a needless posted wait can be removed from the system timer execution path. * Before patch register writes are taking up .078% @ 500MHz during idle. Address |total |min |max |avr |count|ratio% old\process\default_idle|7.369s |0.0us|999.902ms|14.477ms|509. |62.661% ld\Global\cpu_v7_do_idle|4.265s |0.0us|375.786ms|24.374ms|175. |36.270% (UNKNOWN)|17.503ms|0.us|531.080us|5.119us|3419. |0.148% r\omap_dm_timer_set_load|8.135ms|0.0us|79.887us|15.065us|540. |0.069% <-- \vmlinux-old\Global\_end|2.023ms|0.0us|4.000us|0.560us|3613. |0.017% -old\Global\__raw_readsw|1.962ms|0.0us|108.610us|9.167us|214. |0.016% old\smc91x\smc_interrupt|1.353ms|0.0us|10.212us|2.348us|576. |0.011% s/namei\__link_path_walk|1.161ms|0.0us|4.310us|0.762us| 1524. |0.009% \omap_dm_timer_write_reg|1.085ms|0.0us|126.150us|2.153us|504. |0.009% <-- * After patch timer functions do not show up in top listings for long captures. Signed-off-by: Richard Woodruff <r-woodruff2@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: DMTimer: Use posted modeRichard Woodruff2008-07-031-42/+151
| | | | | | | | | | | | | | | | This patch adds the use of write posting for the timer. Previously, every write could lock the requestor for almost 3x32KHz cycles. This patch only synchronizes before writes and reads instead of after them and it does it on per register basis. Doing it this way there is some chance to hide some of the sync latency. It also removes some needless reads when non-posted mode is there. With out this fix the read/writes take almost 2% CPU load @500MHz just waiting on tick timer registers. Also define new 34xx only registers. Signed-off-by: Richard Woodruff <r-woodruff2@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-03-061-1/+1
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Add dmtimer support for OMAP3Syed Mohammed, Khasim2008-02-081-4/+47
| | | | | | | | | | Add DM timer support for OMAP3. Fixed source clocks for 3430 by Paul Walmsley <paul@pwsan.com>. Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Pre-3430 clean-up for dmtimer.cSyed Mohammed, Khasim2008-02-081-24/+41
| | | | | | | | Cleanup DM timer list for OMAP2 and OMAP1 to allow adding support for 3430. Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: fix OMAP1 dmtimer build warningDavid Brownell2007-08-221-5/+0
| | | | | | | | | Remove the OMAP1 version of omap_dm_timer_get_fclk(), and its associated compile-time warning. It would only BUG() if called, while it's only called on OMAP2. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Sync core code with linux-omapTony Lindgren2007-05-081-1/+1
| | | | | | | | | This patch syncs omap specific core code with linux-omap. Most of the changes are needed to fix bitrot caused by driver updates in linux-omap tree. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: plat-omap changes for 2430 SDPSyed Mohammed Khasim2007-05-051-0/+2
| | | | | | | | | This patch adds minimal OMAP2430 support to plat-omap files to get the kernel booting on 2430SDP. Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: dmtimer.c omap1 register fixMatthew Percival2007-03-021-2/+2
| | | | | | | | | When I went to use dmtimer7 it did not seem to work. I noticed that the base addresses for dmtimers 7 and 8 were set wrong. A simple patch to correct a small error. Confirmed to fix the problem on an OSK. Signed-off-by: Matthew Percival <matthew@capgo.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Fix warnings in plat-omapDirk Behme2007-03-021-0/+2
| | | | | | | | | | | | | | | | | Fix warnings arch/arm/plat-omap/dmtimer.c: In function 'omap_dm_timer_modify_idlect_mask': arch/arm/plat-omap/dmtimer.c:317: warning: no return statement in function returning non-void arch/arm/plat-omap/mailbox.c: In function 'omap_mbox_init': arch/arm/plat-omap/mailbox.c:231: warning: ignoring return value of 'class_device_create_file', declared with attribute warn_unused_result Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: OMAP2 dmtimer power management supportJuha Yrjola2006-09-251-1/+9
| | | | | | | | GPT1 will be set into non-posted mode, and the wakeup register is set for all timers. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Add enable/disable functions for dmtimerTimo Teras2006-09-251-42/+31
| | | | | | | | Add enable/disable functions which effectively control the GPT iclk and fclk. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Use GPT iclk only when neededTimo Teras2006-09-251-13/+62
| | | | | | | | | | This patch makes the OMAP2 dmtimers module using the interface clocks only while the registers are accessed (except GPT1 which has iclk enabled all the time). Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1Tony Lindgren2006-07-011-1/+1
| | | | | | | | | | | | Patch from Tony Lindgren Fixes compilation errors on OMAP1. Patch from Timo Teras. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Update dmtimersTimo Teras2006-06-261-16/+30
| | | | | | | | | | - Initialize timer outside of spinlock to reduce the time the spinlock is held - Do clk_get to the source clocks during initialization to avoid sleeping later - New function to set counter register Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Fix 32 kHz timer and modify GP timer to use GPT1Timo Teras2006-06-261-4/+5
| | | | | | | | | | The dmtimer framework update broke 32 kHz timer as udelay() does not work before system timer is started (and GPT1 should not be reset). This also makes the GP timer use GPT1. This requires a fix in clock framework. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Port dmtimers to OMAP2 and implement PWM supportTimo Teras2006-06-261-118/+295
| | | | | | | | | | Port dmtimer framework to OMAP2. Modify the dmtimers API to support setting of PWM configuration and prescaler. Convert 32 kHz timer and GP timer to use the dmtimer framework. Signed-off-by: Timo Teras <timo.teras@solidboot.com> Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] 3427/1: ARM: OMAP: 2/8 Update timersTony Lindgren2006-04-021-0/+26
| | | | | | | | | | | | | | Patch from Tony Lindgren Update OMAP timers from linux-omap tree. The highlights of the patch are: - Move timer32k code from mach-omap1 to plat-omap and make it work also on omap24xx by Tony Lindgren - Add support for dmtimer idle check for PM by Tuukka Tikkanen Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Include asm/hardware.h instead of asm/arch/hardware.hRussell King2005-11-161-1/+1
| | | | | | Rationalise hardware.h include. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2887/1: OMAP 2/4: Update files common to omap1 and omap2, take 2Tony Lindgren2005-09-071-0/+260
Patch from Tony Lindgren This patch syncs the mainline kernel with linux-omap tree. The highlights of the patch are: - Clock updates by Tuukka Tikkanen, Juha Yrjola, Daniel Petrini and Tony Lindgren - DMA fixes by Imre Deak, Juha Yrjola and Daniel Petrini - Add support to dual-mode hardware timers by Lauri Leukkunen - GPIO support for 24xx by Paul Mundt - GPIO wake-up support by Tony Lindgren - Better GPIO interrupt handler to not lose interrupts by Ralph Walden and Ladislav Michl - Power Management updates by Tuukka Tikkanen - Make Power Management code use new SRAM functions by Tony Lindgren Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>