diff options
Diffstat (limited to 'arch/arm/mach-h720x')
-rw-r--r-- | arch/arm/mach-h720x/common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-h720x/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-h720x/cpu-h7201.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-h720x/cpu-h7202.c | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index aa1331e86bcf..17ef91fa3d56 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c @@ -42,12 +42,12 @@ void __init arch_dma_init(dma_t *dma) } /* - * Return usecs since last timer reload + * Return nsecs since last timer reload * (timercount * (usecs perjiffie)) / (ticks per jiffie) */ -unsigned long h720x_gettimeoffset(void) +u32 h720x_gettimeoffset(void) { - return (CPU_REG (TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH; + return ((CPU_REG(TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH) * 1000; } /* diff --git a/arch/arm/mach-h720x/common.h b/arch/arm/mach-h720x/common.h index 2489537d33dd..79cfb9706360 100644 --- a/arch/arm/mach-h720x/common.h +++ b/arch/arm/mach-h720x/common.h @@ -13,7 +13,7 @@ * */ -extern unsigned long h720x_gettimeoffset(void); +extern u32 h720x_gettimeoffset(void); extern void __init h720x_init_irq(void); extern void __init h720x_map_io(void); extern void h720x_restart(char, const char *); diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c index 24df2a349a98..ba349cffcd3a 100644 --- a/arch/arm/mach-h720x/cpu-h7201.c +++ b/arch/arm/mach-h720x/cpu-h7201.c @@ -46,6 +46,8 @@ static struct irqaction h7201_timer_irq = { */ void __init h7201_init_time(void) { + arch_gettimeoffset = h720x_gettimeoffset; + CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; @@ -56,5 +58,4 @@ void __init h7201_init_time(void) struct sys_timer h7201_timer = { .init = h7201_init_time, - .offset = h720x_gettimeoffset, }; diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index c37d570b852d..fb9ca76c7313 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c @@ -180,6 +180,8 @@ static struct irqaction h7202_timer_irq = { */ void __init h7202_init_time(void) { + arch_gettimeoffset = h720x_gettimeoffset; + CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; @@ -190,7 +192,6 @@ void __init h7202_init_time(void) struct sys_timer h7202_timer = { .init = h7202_init_time, - .offset = h720x_gettimeoffset, }; void __init h7202_init_irq (void) |