summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/timer.c
AgeCommit message (Collapse)Author
2012-03-13ARM: tegra: convert to twd_local_timer_register() interfaceMarc Zyngier
Add support for the new smp_twd runtime registration interface to the tegra platforms, and remove the old compile-time support. Tested on Harmony. Acked-by: Stephen Warren <swarren@nvidia.com> Cc: Colin Cross <ccross@android.com> Cc: Olof Johansson <olof@lixom.net> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2012-01-07Merge branch 'depends/rmk/for-linus' into next/socArnd Bergmann
Conflicts: arch/arm/mach-tegra/board-dt-tegra20.c arch/arm/mach-tegra/common.c
2011-12-18ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtimeMarc Zyngier
sched_clock() is yet another blocker on the road to the single image. This patch implements an idea by Russell King: http://www.spinics.net/lists/linux-omap/msg49561.html Instead of asking the platform to implement both sched_clock() itself and the rollover callback, simply register a read() function, and let the ARM code care about sched_clock() itself, the conversion to ns and the rollover. sched_clock() uses this read() function as an indirection to the platform code. If the platform doesn't provide a read(), the code falls back to the jiffy counter (just like the default sched_clock). This allow some simplifications and possibly some footprint gain when multiple platforms are compiled in. Among the drawbacks, the removal of the *_fixed_sched_clock optimization which could negatively impact some platforms (sa1100, tegra, versatile and omap). Tested on 11MPCore, OMAP4 and Tegra. Cc: Imre Kaloz <kaloz@openwrt.org> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Alessandro Rubini <rubini@unipv.it> Cc: STEricsson <STEricsson_nomadik_linux@list.st.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Ben Dooks <ben-linux@fluff.org> Tested-by: Jamie Iles <jamie@jamieiles.com> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Krzysztof Halasa <khc@pm.waw.pl> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-12-17arm/tegra: don't export clk_measure_input_freqPeter De Schrijver
don't export clk_measure_input_freq as its functionality is also available using clk_get_rate(). Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Colin Cross <ccross@android.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-12-17arm/tegra: clk_get should not be fatalPeter De Schrijver
The timer and rtc-timer clocks aren't gated by default, so there is no reason to crash the system if the dummy enable call failed. Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2011-10-13ARM: tegra: tegra_rtc_read_ms should be staticOlof Johansson
Not exported and not used externally. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-10-13ARM: tegra: timer: don't cast __iomem pointersOlof Johansson
Fixes a lot of: arch/arm/mach-tegra/timer.c:75:2: warning: cast removes address space of expression arch/arm/mach-tegra/timer.c:75:2: warning: incorrect type in argument 1 (different base types) arch/arm/mach-tegra/timer.c:75:2: expected void const volatile [noderef] <asn:2>*<noident> arch/arm/mach-tegra/timer.c:75:2: got unsigned int arch/arm/mach-tegra/timer.c:75:2: warning: cast removes address space of expression Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
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>