Re: [PATCH] omap1: Fix sched_clock for the MPU timer (Re: State of LDP3430 platform)

Tony Lindgren
2011-01-19T18:45:09Z

* Tony Lindgren <tony@atomide.com> [110118 14:25]:
> * Paul Walmsley <paul@pwsan.com> [110118 11:35]:
> >
> > Here's a slightly updated version of this patch, fixing a bug in one of
> > the comments, and revising the commit message. There's no functional
> > difference between this and the previous version of this patch.
>
> Thanks, here are two patches to fix the MPU timer, and then allow
> compiling in both the MPU timer and the 32KiHz timer.

I've updated this patch with the following fix to reset the timer
first to get correct PRINTK_TIME timestamps.

Regards,

Tony

--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -228,10 +228,9 @@ static void __init omap_init_clocksource(unsigned long rate)
static char err[] __initdata = KERN_ERR
"%s: can't register clocksource!\n";

- init_sched_clock(&cd, mpu_update_sched_clock, 32, rate);
-
setup_irq(INT_TIMER2, &omap_mpu_timer2_irq);
omap_mpu_timer_start(1, ~0, 1);
+ init_sched_clock(&cd, mpu_update_sched_clock, 32, rate);

if (clocksource_register_hz(&clocksource_mpu, rate))
printk(err, clocksource_mpu.name);