diff options
author | Marc Zyngier <Marc.Zyngier@arm.com> | 2012-05-05 14:28:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-06 06:09:21 -0400 |
commit | bd0493eaaf5c7a1ea00786d46cc2f4af44e76f28 (patch) | |
tree | bd7fbb1d21c5c00b0c37eeb3ac1b09a9d4f123ac /arch/arm/mach-tegra/timer.c | |
parent | f67860a76f162ebcc6a2cacf3b0538d8a67d55ae (diff) |
ARM: 7413/1: move read_{boot,persistent}_clock to the architecture level
At the moment, read_persistent_clock is implemented at the
platform level, which makes it impossible to compile these
platforms in a single kernel.
Implement these two functions at the architecture level, and
provide a thin registration interface for both read_boot_clock
and read_persistent_clock. The two affected platforms (OMAP and
Tegra) are converted at the same time.
Reported-by: Jeff Ohlstein <johlstei@codeaurora.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-tegra/timer.c')
-rw-r--r-- | arch/arm/mach-tegra/timer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 1eed8d4a80ef..315672c7bd48 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -124,7 +124,7 @@ static u64 tegra_rtc_read_ms(void) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * read_persistent_clock - Return time from a persistent clock. | 127 | * tegra_read_persistent_clock - Return time from a persistent clock. |
128 | * | 128 | * |
129 | * Reads the time from a source which isn't disabled during PM, the | 129 | * Reads the time from a source which isn't disabled during PM, the |
130 | * 32k sync timer. Convert the cycles elapsed since last read into | 130 | * 32k sync timer. Convert the cycles elapsed since last read into |
@@ -133,7 +133,7 @@ static u64 tegra_rtc_read_ms(void) | |||
133 | * tegra_rtc driver could be executing to avoid race conditions | 133 | * tegra_rtc driver could be executing to avoid race conditions |
134 | * on the RTC shadow register | 134 | * on the RTC shadow register |
135 | */ | 135 | */ |
136 | void read_persistent_clock(struct timespec *ts) | 136 | static void tegra_read_persistent_clock(struct timespec *ts) |
137 | { | 137 | { |
138 | u64 delta; | 138 | u64 delta; |
139 | struct timespec *tsp = &persistent_ts; | 139 | struct timespec *tsp = &persistent_ts; |
@@ -243,6 +243,7 @@ static void __init tegra_init_timer(void) | |||
243 | tegra_clockevent.irq = tegra_timer_irq.irq; | 243 | tegra_clockevent.irq = tegra_timer_irq.irq; |
244 | clockevents_register_device(&tegra_clockevent); | 244 | clockevents_register_device(&tegra_clockevent); |
245 | tegra_twd_init(); | 245 | tegra_twd_init(); |
246 | register_persistent_clock(NULL, tegra_read_persistent_clock); | ||
246 | } | 247 | } |
247 | 248 | ||
248 | struct sys_timer tegra_timer = { | 249 | struct sys_timer tegra_timer = { |