diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-02-28 12:54:15 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-02-28 12:54:15 -0500 |
commit | 7266d48fca8ee2a15d15222c41f887e10db54c5a (patch) | |
tree | 775404bcbf8ce146ccaba905e841a3621ae7ce80 /arch/arm/mach-rpc/time.c | |
parent | 168268a225d24da3768a88c1029fb3014b0837ca (diff) | |
parent | 90cf214d6a549bf482e3c5751ee256cc885b96ea (diff) |
Merge branch 'timer/cleanup' into late/mvebu2
Basing the mvebu patches on top of the timer cleanup
avoids some nasty merges.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-rpc/time.c')
-rw-r--r-- | arch/arm/mach-rpc/time.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-rpc/time.c b/arch/arm/mach-rpc/time.c index 581fca934bb3..9a6def14df01 100644 --- a/arch/arm/mach-rpc/time.c +++ b/arch/arm/mach-rpc/time.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
26 | 26 | ||
27 | unsigned long ioc_timer_gettimeoffset(void) | 27 | static u32 ioc_timer_gettimeoffset(void) |
28 | { | 28 | { |
29 | unsigned int count1, count2, status; | 29 | unsigned int count1, count2, status; |
30 | long offset; | 30 | long offset; |
@@ -56,7 +56,7 @@ unsigned long ioc_timer_gettimeoffset(void) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | offset = (LATCH - offset) * (tick_nsec / 1000); | 58 | offset = (LATCH - offset) * (tick_nsec / 1000); |
59 | return (offset + LATCH/2) / LATCH; | 59 | return ((offset + LATCH/2) / LATCH) * 1000; |
60 | } | 60 | } |
61 | 61 | ||
62 | void __init ioctime_init(void) | 62 | void __init ioctime_init(void) |
@@ -82,14 +82,9 @@ static struct irqaction ioc_timer_irq = { | |||
82 | /* | 82 | /* |
83 | * Set up timer interrupt. | 83 | * Set up timer interrupt. |
84 | */ | 84 | */ |
85 | static void __init ioc_timer_init(void) | 85 | void __init ioc_timer_init(void) |
86 | { | 86 | { |
87 | arch_gettimeoffset = ioc_timer_gettimeoffset; | ||
87 | ioctime_init(); | 88 | ioctime_init(); |
88 | setup_irq(IRQ_TIMER0, &ioc_timer_irq); | 89 | setup_irq(IRQ_TIMER0, &ioc_timer_irq); |
89 | } | 90 | } |
90 | |||
91 | struct sys_timer ioc_timer = { | ||
92 | .init = ioc_timer_init, | ||
93 | .offset = ioc_timer_gettimeoffset, | ||
94 | }; | ||
95 | |||