aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mvme147
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-08 13:34:55 -0500
committerStephen Warren <swarren@nvidia.com>2012-12-24 11:36:34 -0500
commitc8d5ba1891eda2aa63800f052cb5af128283d130 (patch)
tree59a18c2262607b4067739fe4dfed3c6fa8e40f14 /arch/m68k/mvme147
parent7b1f62076bba10786d2118006ae68ac120cd6c56 (diff)
m68k: set arch_gettimeoffset directly
remove m68k's mach_gettimeoffset function pointer, and instead directly set the arch_gettimeoffset function pointer. This requires multiplying all function results by 1000, since the removed m68k_gettimeoffset() did this. Also, s/unsigned long/u32/ just to make the function prototypes exactly match that of arch_gettimeoffset. Cc: Joshua Thompson <funaho@jurai.org> Cc: Sam Creasey <sammy@sammy.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Phil Blundell <philb@gnu.org> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/m68k/mvme147')
-rw-r--r--arch/m68k/mvme147/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index a41c09149e23..1c6262803b94 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -37,7 +37,7 @@
37 37
38static void mvme147_get_model(char *model); 38static void mvme147_get_model(char *model);
39extern void mvme147_sched_init(irq_handler_t handler); 39extern void mvme147_sched_init(irq_handler_t handler);
40extern unsigned long mvme147_gettimeoffset (void); 40extern u32 mvme147_gettimeoffset(void);
41extern int mvme147_hwclk (int, struct rtc_time *); 41extern int mvme147_hwclk (int, struct rtc_time *);
42extern int mvme147_set_clock_mmss (unsigned long); 42extern int mvme147_set_clock_mmss (unsigned long);
43extern void mvme147_reset (void); 43extern void mvme147_reset (void);
@@ -88,7 +88,7 @@ void __init config_mvme147(void)
88 mach_max_dma_address = 0x01000000; 88 mach_max_dma_address = 0x01000000;
89 mach_sched_init = mvme147_sched_init; 89 mach_sched_init = mvme147_sched_init;
90 mach_init_IRQ = mvme147_init_IRQ; 90 mach_init_IRQ = mvme147_init_IRQ;
91 mach_gettimeoffset = mvme147_gettimeoffset; 91 arch_gettimeoffset = mvme147_gettimeoffset;
92 mach_hwclk = mvme147_hwclk; 92 mach_hwclk = mvme147_hwclk;
93 mach_set_clock_mmss = mvme147_set_clock_mmss; 93 mach_set_clock_mmss = mvme147_set_clock_mmss;
94 mach_reset = mvme147_reset; 94 mach_reset = mvme147_reset;
@@ -127,7 +127,7 @@ void mvme147_sched_init (irq_handler_t timer_routine)
127 127
128/* This is always executed with interrupts disabled. */ 128/* This is always executed with interrupts disabled. */
129/* XXX There are race hazards in this code XXX */ 129/* XXX There are race hazards in this code XXX */
130unsigned long mvme147_gettimeoffset (void) 130u32 mvme147_gettimeoffset(void)
131{ 131{
132 volatile unsigned short *cp = (volatile unsigned short *)0xfffe1012; 132 volatile unsigned short *cp = (volatile unsigned short *)0xfffe1012;
133 unsigned short n; 133 unsigned short n;
@@ -137,7 +137,7 @@ unsigned long mvme147_gettimeoffset (void)
137 n = *cp; 137 n = *cp;
138 138
139 n -= PCC_TIMER_PRELOAD; 139 n -= PCC_TIMER_PRELOAD;
140 return (unsigned long)n * 25 / 4; 140 return ((unsigned long)n * 25 / 4) * 1000;
141} 141}
142 142
143static int bcd2int (unsigned char b) 143static int bcd2int (unsigned char b)