On Wed, 25 Feb 2009 14:06:14 +0100, Gilles Chanteperdrix <[email protected]> wrote: > Gwenhaël wrote: >> With i.MXL processor, kernel patched with >> adeos-2.6.27-ipipe-1.12-00.patch wait indefinitly for timer >> calibration. >> Tick event never appear. This patch modify acktimer() in >> arch/arm/mach-imx/time.c. >> >> I need to know if this modification is good (without adding >> new errors). > > ipipe_mach_update_tsc should be called from imx_timer_interrupt, so, > there is no need to call it from acktimer (and in fact, avoiding the > call to update_tsc in acktimer reduces the timer interrupt latency). So, > maybe what is needed and is missing is simply to read > IMX_TSTAT(TIMER_BASE) ?
I've made modifications on patch thanks to your assumption. The new patch work fine. Thank you very much Gwenhael Signed-off-by: [email protected] diff -ru a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c --- a/arch/arm/mach-imx/irq.c 2009-02-17 11:32:52.000000000 +0100 +++ b/arch/arm/mach-imx/irq.c 2009-02-23 14:12:43.000000000 +0100 @@ -35,7 +35,7 @@ #include <asm/io.h> #include <asm/mach/irq.h> -#include <asm/arch/imx-regs.h> +#include <mach/imx-regs.h> /* Used for IMX INTERRUPT priority: Still Experimental */ diff -ru a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c --- a/arch/arm/mach-imx/time.c 2009-02-25 15:10:01.000000000 +0100 +++ b/arch/arm/mach-imx/time.c 2009-02-25 15:10:49.000000000 +0100 @@ -89,25 +89,23 @@ imx_timer_interrupt(int irq, void *dev_id) { struct clock_event_device *evt = &clockevent_imx; -#ifndef CONFIG_IPIPE uint32_t tstat; irqreturn_t ret = IRQ_NONE; /* clear the interrupt */ tstat = IMX_TSTAT(TIMER_BASE); +#ifndef CONFIG_IPIPE IMX_TSTAT(TIMER_BASE) = 0; +#endif if (tstat & TSTAT_COMP) { +#ifdef CONFIG_IPIPE ipipe_mach_update_tsc(); +#endif evt->event_handler(evt); ret = IRQ_HANDLED; } return ret; -#else /* CONFIG_IPIPE */ - ipipe_mach_update_tsc(); - evt->event_handler(evt); - return IRQ_HANDLED; -#endif /* CONFIG_IPIPE */ } static struct irqaction imx_timer_irq = { _______________________________________________ Adeos-main mailing list [email protected] https://mail.gna.org/listinfo/adeos-main
