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/mach-ebsa110/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-ebsa110') diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index f0fe6b5350e2..d96dd94fb582 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c @@ -158,7 +158,7 @@ static void __init ebsa110_init_early(void) * interrupt, then the PIT counter will roll over (ie, be negative). * This actually works out to be convenient. */ -static unsigned long ebsa110_gettimeoffset(void) +static u32 ebsa110_gettimeoffset(void) { unsigned long offset, count; @@ -181,7 +181,7 @@ static unsigned long ebsa110_gettimeoffset(void) */ offset = offset * (1000000 / HZ) / COUNT; - return offset; + return offset * 1000; } static irqreturn_t @@ -215,6 +215,8 @@ static struct irqaction ebsa110_timer_irq = { */ static void __init ebsa110_timer_init(void) { + arch_gettimeoffset = ebsa110_gettimeoffset; + /* * Timer 1, mode 2, LSB/MSB */ @@ -227,7 +229,6 @@ static void __init ebsa110_timer_init(void) static struct sys_timer ebsa110_timer = { .init = ebsa110_timer_init, - .offset = ebsa110_gettimeoffset, }; static struct plat_serial8250_port serial_platform_data[] = { -- cgit v1.2.3