Commit Graph

8 Commits

Author SHA1 Message Date
Colin Cross 62248ae826 ARM: tegra: timer: Enable timer and rtc clocks
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-22 14:48:27 -08:00
Colin Cross 093617851c ARM: tegra: timer: Add idle and suspend support to timers
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-09 22:17:38 -08:00
Colin Cross 2ea67fd145 ARM: tegra: Add prototypes for subsystem suspend functions
Signed-off-by: Colin Cross <ccross@android.com>
2011-02-09 21:57:01 -08:00
Russell King e3f4c0ab91 ARM: tegra: convert sched_clock() to use new infrastructure
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-22 22:44:47 +00:00
Russell King 5e06b6492e ARM: ensure all sched_clock() implementations are notrace marked
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-22 22:44:42 +00:00
Colin Cross 684e94cbcb ARM: tegra: timer: Separate clocksource and sched_clock
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-12-22 22:44:42 +00:00
Zimny Lech 61d8e11e51 Remove duplicate includes from many files
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-10-27 18:03:18 -07:00
Colin Cross 2d5cd9a38b [ARM] tegra: Add timer support
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>
2010-08-05 14:57:02 -07:00