From 23c197b77f9553c30f9c8a5ab41279a35f135f37 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 8 Nov 2012 11:51:58 -0700 Subject: ARM: set arch_gettimeoffset directly remove ARM's struct sys_timer .offset function pointer, and instead directly set the arch_gettimeoffset function pointer when the timer driver is initialized. This requires multiplying all function results by 1000, since the removed arm_gettimeoffset() did this. Also, s/unsigned long/u32/ just to make the function prototypes exactly match that of arch_gettimeoffset. Cc: Russell King Cc: Andrew Victor Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard Cc: Hartley Sweeten Cc: Ryan Mallon Cc: Ben Dooks Cc: Kukjin Kim Signed-off-by: Stephen Warren --- arch/arm/plat-samsung/time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c index 60552e22f22e..67206df94aa8 100644 --- a/arch/arm/plat-samsung/time.c +++ b/arch/arm/plat-samsung/time.c @@ -95,7 +95,7 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks) * IRQs are disabled before entering here from do_gettimeofday() */ -static unsigned long s3c2410_gettimeoffset (void) +static u32 s3c2410_gettimeoffset(void) { unsigned long tdone; unsigned long tval; @@ -120,7 +120,7 @@ static unsigned long s3c2410_gettimeoffset (void) tdone += timer_startval; } - return timer_ticks_to_usec(tdone); + return timer_ticks_to_usec(tdone) * 1000; } @@ -273,6 +273,8 @@ static void __init s3c2410_timer_resources(void) static void __init s3c2410_timer_init(void) { + arch_gettimeoffset = s3c2410_gettimeoffset; + s3c2410_timer_resources(); s3c2410_timer_setup(); setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); @@ -280,6 +282,5 @@ static void __init s3c2410_timer_init(void) struct sys_timer s3c24xx_timer = { .init = s3c2410_timer_init, - .offset = s3c2410_gettimeoffset, .resume = s3c2410_timer_setup }; -- cgit v1.2.1