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>
此提交包含在:
@@ -251,7 +251,7 @@ void __init config_hp300(void)
|
||||
mach_sched_init = hp300_sched_init;
|
||||
mach_init_IRQ = hp300_init_IRQ;
|
||||
mach_get_model = hp300_get_model;
|
||||
mach_gettimeoffset = hp300_gettimeoffset;
|
||||
arch_gettimeoffset = hp300_gettimeoffset;
|
||||
mach_hwclk = hp300_hwclk;
|
||||
mach_get_ss = hp300_get_ss;
|
||||
mach_reset = hp300_reset;
|
||||
|
@@ -46,7 +46,7 @@ static irqreturn_t hp300_tick(int irq, void *dev_id)
|
||||
return vector(irq, NULL);
|
||||
}
|
||||
|
||||
unsigned long hp300_gettimeoffset(void)
|
||||
u32 hp300_gettimeoffset(void)
|
||||
{
|
||||
/* Read current timer 1 value */
|
||||
unsigned char lsb, msb1, msb2;
|
||||
@@ -59,7 +59,7 @@ unsigned long hp300_gettimeoffset(void)
|
||||
/* A carry happened while we were reading. Read it again */
|
||||
lsb = in_8(CLOCKBASE + 7);
|
||||
ticks = INTVAL - ((msb2 << 8) | lsb);
|
||||
return (USECS_PER_JIFFY * ticks) / INTVAL;
|
||||
return ((USECS_PER_JIFFY * ticks) / INTVAL) * 1000;
|
||||
}
|
||||
|
||||
void __init hp300_sched_init(irq_handler_t vector)
|
||||
|
@@ -1,2 +1,2 @@
|
||||
extern void hp300_sched_init(irq_handler_t vector);
|
||||
extern unsigned long hp300_gettimeoffset(void);
|
||||
extern u32 hp300_gettimeoffset(void);
|
||||
|
新增問題並參考
封鎖使用者