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>
Tento commit je obsažen v:
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
unsigned long ioc_timer_gettimeoffset(void)
|
||||
static u32 ioc_timer_gettimeoffset(void)
|
||||
{
|
||||
unsigned int count1, count2, status;
|
||||
long offset;
|
||||
@@ -56,7 +56,7 @@ unsigned long ioc_timer_gettimeoffset(void)
|
||||
}
|
||||
|
||||
offset = (LATCH - offset) * (tick_nsec / 1000);
|
||||
return (offset + LATCH/2) / LATCH;
|
||||
return ((offset + LATCH/2) / LATCH) * 1000;
|
||||
}
|
||||
|
||||
void __init ioctime_init(void)
|
||||
@@ -84,12 +84,12 @@ static struct irqaction ioc_timer_irq = {
|
||||
*/
|
||||
static void __init ioc_timer_init(void)
|
||||
{
|
||||
arch_gettimeoffset = ioc_timer_gettimeoffset;
|
||||
ioctime_init();
|
||||
setup_irq(IRQ_TIMER0, &ioc_timer_irq);
|
||||
}
|
||||
|
||||
struct sys_timer ioc_timer = {
|
||||
.init = ioc_timer_init,
|
||||
.offset = ioc_timer_gettimeoffset,
|
||||
};
|
||||
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele