Re: omap1510 MPU interupt BUG

Tony Lindgren
2006-01-03T17:55:20Z

* Petukhov Nikolay <palmtt2@mail.ru> [051212 11:03]:
> Hi All.
>
> in file linux-2.6.14-omap2/arch/arm/plat-omap/gpio.c
> in function
> static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
>
> .......
>
> isr = __raw_readl(isr_reg);
> .......
>
> Note: __raw_readl return 32bit, but MPU have 16 bit registers
>
> example:
> MPU isr=0x0001, but __raw_readl() return isr=0x00010001 -> virtual interrupt 16
> desc_handle_irq(0, d, regs) - handled ok
> desc_handle_irq(16, d, regs) - interrupt handler = NULL
>
> Here patch fix it
>
> diff -Nru linux-2.6.14-omap2/arch/arm/plat-omap/gpio.c
> linux-2.6.14-omap2-palmtt2/arch/arm/plat-omap/gpio.c
>
> --- linux-2.6.14-omap2/arch/arm/plat-omap/gpio.c Sat Dec 10 21:05:46 2005 +++ linux-2.6.14-omap2-palmtt2/arch/arm/plat-omap/gpio.c Sat Dec 10 19:57:30 2005 @@ -758,6 +758,10 @@
> while(1) {
> isr = __raw_readl(isr_reg);
> +#ifdef CONFIG_ARCH_OMAP15XX + if (bank->method == METHOD_MPUIO)
> + isr&=0xffff;
> +#endif !
> _enable_gpio_irqbank(bank, isr, 0);
> _clear_gpio_irqbank(bank, isr);
> _enable_gpio_irqbank(bank, isr, 1);

Can't read this patch because of the bad formatting... Can you please
repost? Maybe sending it as an attachment works better with a web
interface :)

Tony