--- zzzz-none-000/linux-2.6.19.2/arch/mips/sgi-ip27/ip27-timer.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/mips/sgi-ip27/ip27-timer.c 2007-01-11 07:38:19.000000000 +0000 @@ -134,6 +134,13 @@ irq_exit(); } +unsigned long ip27_do_gettimeoffset(void) +{ + unsigned long ct_cur1; + ct_cur1 = REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT) + CYCLES_PER_JIFFY; + return (ct_cur1 - ct_cur[0]) * NSEC_PER_CYCLE / 1000; +} + /* Includes for ioc3_init(). */ #include #include @@ -214,6 +221,8 @@ .name = "timer" }; +extern int allocate_irqno(void); + void __init plat_timer_setup(struct irqaction *irq) { int irqno = allocate_irqno(); @@ -239,17 +248,12 @@ setup_irq(irqno, &rt_irqaction); } -static unsigned int ip27_hpt_read(void) -{ - return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); -} - void __init ip27_time_init(void) { - mips_hpt_read = ip27_hpt_read; - mips_hpt_frequency = CYCLES_PER_SEC; xtime.tv_sec = get_m48t35_time(); xtime.tv_nsec = 0; + + do_gettimeoffset = ip27_do_gettimeoffset; } void __init cpu_time_init(void)