summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/timer.c
AgeCommit message (Collapse)Author
2011-11-30ARM: tegra: timer: Save TWD counter instead of load registerScott Williams
In tegra_twd_suspend(), save the remaining count rather than the initial count of the timer. Also catch invalid TWD configurations during suspend/restore (e.g., enabled with a zero count). BUG 862605 Change-Id: I05bf9e37f922a2b0a48cff23f1aa94ec8e8e039e Signed-off-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R6c7e5ae1220faee4564cd751fa6c94f7404ddc27
2011-11-30ARM: tegra: power: Add TWD context save/restoreScott Williams
Change-Id: I629f77041ce444dfff32b563795573174afea3a1 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R7a21e91127b44461d219a8bfd388f99ba7a72b53
2011-11-30ARM: tegra: Move common timer code into timer.cScott Williams
The system timer initialization code for Tegra2 and Tegra3 is essentially the same except for the actual physical timer used and the range of possible reference clock frequencies. This change removes the needless duplication of code and restructures the system timer code into common and SOC-specific parts. Change-Id: Icb6e4c0e2b218c67667be9450e10326e1e42945b Signed-off-by: Scott Williams <scwilliams@nvidia.com> DW: Split into logical changes Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rbd3fc10b2a6935dd1ca9272695fd0133e0ca4f15
2011-11-30arm: tegra: timer: New Tegra3 IRQ mappingScott Williams
Rename timer.c to timer-t2.c for consistency with other chip-specific implementations. Bug 790458 Bug 790448 Bug 738259 Original-Change-Id: I7e0fceb716590cd92b64ba00c0bebe659e9beb21 Reviewed-on: http://git-master/r/22885 Tested-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I322324c2177d57657a63e9428f8e49d5df2b828e Rebase-Id: R7312866cdc8044a71cc2f83ad4bc7aa66b07416d
2011-11-30[ARM/tegra] Add Tegra3 supportScott Williams
Bug 764354 Original-Change-Id: I8a390eb4dae87dceacb97461f23d13554868b046 Reviewed-on: http://git-master/r/12228 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Tested-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I8e6b8303898796419fb5a759cd16edff9aeac081 Rebase-Id: R2866240384c6c24f46bd7ef54bc3dc9140d9e96b
2011-11-30ARM: tegra: timer: Add suspend and resume supportColin Cross
Change-Id: I4d431037e83742e123ad81e4614354b14e32d453 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30ARM: tegra: timer: Convert timer suspend/resume to syscoreColin Cross
Signed-off-by: Colin Cross <ccross@android.com> Change-Id: I914e2836b3ab36218658afc77751a7b394f62400
2011-11-30ARM: tegra: remove unused mach/suspend.hColin Cross
mach/suspend.h is not used yet, and its functions will be replaced with syscore ops. Delete it. Change-Id: I7b32d3514e7f4427c7d5faa97c1954a7a2cc286c Signed-off-by: Colin Cross <ccross@android.com>
2011-05-23clocksource: convert ARM 32-bit up counting clocksourcesRussell King
Convert ixp4xx, lpc32xx, mxc, netx, pxa, sa1100, tcc8k, tegra and u300 to use the generic mmio clocksource recently introduced. Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Krzysztof Halasa <khc@pm.waw.pl> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-22ARM: tegra: timer: Enable timer and rtc clocksColin Cross
Enable the timer and rtc clocks to prevent them being turned off by the bootloader clock disabling code. Signed-off-by: Colin Cross <ccross@android.com> Acked-by: Olof Johansson <olof@lixom.net>
2011-02-09ARM: tegra: timer: Add idle and suspend support to timersColin Cross
Implement read_persistent_clock by reading the Tegra RTC registers that stay running during suspend. Save and restore the timer configuration register in suspend. Signed-off-by: Colin Cross <ccross@android.com>
2011-02-09ARM: tegra: Add prototypes for subsystem suspend functionsColin Cross
Signed-off-by: Colin Cross <ccross@android.com>
2010-12-22ARM: tegra: convert sched_clock() to use new infrastructureRussell King
Convert tegra to use the new sched_clock() infrastructure for extending 32bit counters to full 64-bit nanoseconds. Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22ARM: ensure all sched_clock() implementations are notrace markedRussell King
ftrace requires sched_clock() to be notrace. Ensure that all implementations are so marked. Also make sure that they include linux/sched.h Also ensure OMAP clocksource read functions are marked notrace as they're used for sched_clock() too. Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Will Deacon <will.deacon@arm.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Eric Miao <eric.y.miao@gmail.com> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-22ARM: tegra: timer: Separate clocksource and sched_clockColin Cross
tegra_clocksource_read should not use cnt32_to_63, wrapping is already handled in the clocksource code. Move the cnt32_to_63 into the sched_clock function, and replace the use of clocksource mult and shift with a multiplication by 1000 to convert us to ns. Acked-by: John Stultz <johnstul@us.ibm.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-10-27Remove duplicate includes from many filesZimny Lech
Signed-off-by: Zimny Lech <napohybelskurwysynom2010@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-05[ARM] tegra: Add timer supportColin Cross
v2: fixes from Russell King: - include linux/io.h instead of asm/io.h fixes from Gary King: - remove extra (and incorrect) irq definitions - use timer 3 instead of timer 1 for compatibility with other drivers - fix typo that disabled oneshot mode v3: - Implement sched_clock - Fix checkpatch issues fixes from Gary King: - Fix incorrect cycles calculation - Fix min_delta_ns assignment fixes from Linus Walleij: - use calc_mult_shift() instead of hard coding values Signed-off-by: Colin Cross <ccross@android.com>