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>
This commit is contained in:
Stephen Warren
2012-11-08 11:51:58 -07:00
vanhempi c8d5ba1891
commit 23c197b77f
11 muutettua tiedostoa jossa 42 lisäystä ja 46 poistoa

Näytä tiedosto

@@ -69,16 +69,6 @@ unsigned long profile_pc(struct pt_regs *regs)
EXPORT_SYMBOL(profile_pc);
#endif
#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
static u32 arm_gettimeoffset(void)
{
if (system_timer->offset != NULL)
return system_timer->offset() * 1000;
return 0;
}
#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
#ifndef CONFIG_GENERIC_CLOCKEVENTS
/*
* Kernel system timer support.
@@ -164,10 +154,6 @@ device_initcall(timer_init_syscore_ops);
void __init time_init(void)
{
#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
arch_gettimeoffset = arm_gettimeoffset;
#endif
system_timer = machine_desc->timer;
system_timer->init();
sched_clock_postinit();