diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-11-08 13:51:58 -0500 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-12-24 11:36:35 -0500 |
commit | 23c197b77f9553c30f9c8a5ab41279a35f135f37 (patch) | |
tree | 7da1f4b032ff24482afb1f289ab9c633de684d7a /arch/arm/mach-ebsa110 | |
parent | c8d5ba1891eda2aa63800f052cb5af128283d130 (diff) |
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 <linux@arm.linux.org.uk>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-ebsa110')
-rw-r--r-- | arch/arm/mach-ebsa110/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) | |||
158 | * interrupt, then the PIT counter will roll over (ie, be negative). | 158 | * interrupt, then the PIT counter will roll over (ie, be negative). |
159 | * This actually works out to be convenient. | 159 | * This actually works out to be convenient. |
160 | */ | 160 | */ |
161 | static unsigned long ebsa110_gettimeoffset(void) | 161 | static u32 ebsa110_gettimeoffset(void) |
162 | { | 162 | { |
163 | unsigned long offset, count; | 163 | unsigned long offset, count; |
164 | 164 | ||
@@ -181,7 +181,7 @@ static unsigned long ebsa110_gettimeoffset(void) | |||
181 | */ | 181 | */ |
182 | offset = offset * (1000000 / HZ) / COUNT; | 182 | offset = offset * (1000000 / HZ) / COUNT; |
183 | 183 | ||
184 | return offset; | 184 | return offset * 1000; |
185 | } | 185 | } |
186 | 186 | ||
187 | static irqreturn_t | 187 | static irqreturn_t |
@@ -215,6 +215,8 @@ static struct irqaction ebsa110_timer_irq = { | |||
215 | */ | 215 | */ |
216 | static void __init ebsa110_timer_init(void) | 216 | static void __init ebsa110_timer_init(void) |
217 | { | 217 | { |
218 | arch_gettimeoffset = ebsa110_gettimeoffset; | ||
219 | |||
218 | /* | 220 | /* |
219 | * Timer 1, mode 2, LSB/MSB | 221 | * Timer 1, mode 2, LSB/MSB |
220 | */ | 222 | */ |
@@ -227,7 +229,6 @@ static void __init ebsa110_timer_init(void) | |||
227 | 229 | ||
228 | static struct sys_timer ebsa110_timer = { | 230 | static struct sys_timer ebsa110_timer = { |
229 | .init = ebsa110_timer_init, | 231 | .init = ebsa110_timer_init, |
230 | .offset = ebsa110_gettimeoffset, | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | static struct plat_serial8250_port serial_platform_data[] = { | 234 | static struct plat_serial8250_port serial_platform_data[] = { |