diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-11-08 19:51:58 +0100 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-12-24 17:36:35 +0100 |
commit | 23c197b77f9553c30f9c8a5ab41279a35f135f37 (patch) | |
tree | 7da1f4b032ff24482afb1f289ab9c633de684d7a /arch/arm/mach-h720x/common.c | |
parent | m68k: set arch_gettimeoffset directly (diff) | |
download | linux-23c197b77f9553c30f9c8a5ab41279a35f135f37.tar.xz linux-23c197b77f9553c30f9c8a5ab41279a35f135f37.zip |
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-h720x/common.c')
-rw-r--r-- | arch/arm/mach-h720x/common.c | 6 |
1 files changed, 3 insertions, 3 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; } /* |