* omap1510 MPU interupt BUG
@ 2005-12-12 16:25 Petukhov Nikolay
2006-01-03 17:55 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Petukhov Nikolay @ 2005-12-12 16:25 UTC (permalink / raw)
To: linux-omap-open-source
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);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: omap1510 MPU interupt BUG
2005-12-12 16:25 omap1510 MPU interupt BUG Petukhov Nikolay
@ 2006-01-03 17:55 ` Tony Lindgren
2006-01-06 19:37 ` [PATCH] " Dirk Behme
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2006-01-03 17:55 UTC (permalink / raw)
To: Petukhov Nikolay; +Cc: linux-omap-open-source
* 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
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] Re: omap1510 MPU interupt BUG
2006-01-03 17:55 ` Tony Lindgren
@ 2006-01-06 19:37 ` Dirk Behme
2006-01-16 8:28 ` palmtt2
0 siblings, 1 reply; 5+ messages in thread
From: Dirk Behme @ 2006-01-06 19:37 UTC (permalink / raw)
To: Tony Lindgren, Petukhov Nikolay; +Cc: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]
Tony Lindgren wrote:
>>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 :)
arch/arm/plat-omap/gpio.c has changed since 2.6.14-omap2, so patch above
will not apply to recent git even if formatting is correct. I tried to
adapt it to current version of gpio.c. I can't test it, so is patch
below okay?
[-- Attachment #2: omap1510_mpu_interrupt_bug.patch --]
[-- Type: text/plain, Size: 522 bytes --]
--- ./arch/arm/plat-omap/gpio.c_orig 2006-01-06 19:37:32.602154520 +0100
+++ ./arch/arm/plat-omap/gpio.c 2006-01-06 19:44:03.917665520 +0100
@@ -767,6 +767,9 @@ static void gpio_irq_handler(unsigned in
OMAP24XX_GPIO_LEVELDETECT0) |
__raw_readl(bank->base +
OMAP24XX_GPIO_LEVELDETECT1);
+ if(cpu_is_omap15xx())
+ if(bank->method == METHOD_MPUIO)
+ level_mask = 0xffff0000;
/* clear edge sensitive interrupts before handler(s) are
called so that we don't miss any interrupt occurred while
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Re: omap1510 MPU interupt BUG
2006-01-06 19:37 ` [PATCH] " Dirk Behme
@ 2006-01-16 8:28 ` palmtt2
2006-01-20 18:43 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: palmtt2 @ 2006-01-16 8:28 UTC (permalink / raw)
To: Dirk Behme, omap
[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]
Dirk Behme wrote:
> Tony Lindgren wrote:
>
>>> 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 :)
>
> arch/arm/plat-omap/gpio.c has changed since 2.6.14-omap2, so patch above
> will not apply to recent git even if formatting is correct. I tried to
> adapt it to current version of gpio.c. I can't test it, so is patch
> below okay?
>
>
> ------------------------------------------------------------------------
>
> --- ./arch/arm/plat-omap/gpio.c_orig 2006-01-06 19:37:32.602154520 +0100
> +++ ./arch/arm/plat-omap/gpio.c 2006-01-06 19:44:03.917665520 +0100
> @@ -767,6 +767,9 @@ static void gpio_irq_handler(unsigned in
> OMAP24XX_GPIO_LEVELDETECT0) |
> __raw_readl(bank->base +
> OMAP24XX_GPIO_LEVELDETECT1);
> + if(cpu_is_omap15xx())
> + if(bank->method == METHOD_MPUIO)
> + level_mask = 0xffff0000;
>
> /* clear edge sensitive interrupts before handler(s) are
> called so that we don't miss any interrupt occurred while
>
>
>
>
Patch to fixed MPUIO interrupt.
Tested on linux-2.6.15-omap1.
[-- Attachment #2: patch-2.6.15-omap1-mpu_bug.diff --]
[-- Type: text/x-patch, Size: 626 bytes --]
diff -Nru linux-2.6.15-omap1/arch/arm/plat-omap/gpio.c linux-2.6.15-omap1-palmtt2/arch/arm/plat-omap/gpio.c
--- linux-2.6.15-omap1/arch/arm/plat-omap/gpio.c 2006-01-10 03:06:49.000000000 +0500
+++ linux-2.6.15-omap1-palmtt2/arch/arm/plat-omap/gpio.c 2006-01-15 13:36:52.000000000 +0500
@@ -767,6 +767,11 @@
OMAP24XX_GPIO_LEVELDETECT0) |
__raw_readl(bank->base +
OMAP24XX_GPIO_LEVELDETECT1);
+ if(cpu_is_omap15xx())
+ if(bank->method == METHOD_MPUIO) {
+ isr &= 0x0000ffff;
+ }
/* clear edge sensitive interrupts before handler(s) are
called so that we don't miss any interrupt occurred while
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Re: omap1510 MPU interupt BUG
2006-01-16 8:28 ` palmtt2
@ 2006-01-20 18:43 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2006-01-20 18:43 UTC (permalink / raw)
To: palmtt2; +Cc: omap
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
* palmtt2 <palmtt2@mail.ru> [060116 01:01]:
> Dirk Behme wrote:
> >------------------------------------------------------------------------
> >
> >--- ./arch/arm/plat-omap/gpio.c_orig 2006-01-06 19:37:32.602154520 +0100
> >+++ ./arch/arm/plat-omap/gpio.c 2006-01-06 19:44:03.917665520 +0100
> >@@ -767,6 +767,9 @@ static void gpio_irq_handler(unsigned in
> > OMAP24XX_GPIO_LEVELDETECT0) |
> > __raw_readl(bank->base +
> > OMAP24XX_GPIO_LEVELDETECT1);
> >+ if(cpu_is_omap15xx())
> >+ if(bank->method == METHOD_MPUIO)
> >+ level_mask = 0xffff0000;
> >
> > /* clear edge sensitive interrupts before handler(s) are
> > called so that we don't miss any interrupt occurred while
> >
> >
> >
> >
> Patch to fixed MPUIO interrupt.
> Tested on linux-2.6.15-omap1.
Thanks, I'll push a slightly modified version below.
[-- Attachment #2: patch-1510-gpio-mpu-fix-modified --]
[-- Type: text/plain, Size: 462 bytes --]
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index cf5ad29..cb740c3 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -764,6 +764,10 @@ static void gpio_irq_handler(unsigned in
u32 isr_saved, level_mask = 0;
isr_saved = isr = __raw_readl(isr_reg);
+
+ if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO))
+ isr &= 0x0000ffff;
+
if (cpu_is_omap24xx())
level_mask =
__raw_readl(bank->base +
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-20 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-12 16:25 omap1510 MPU interupt BUG Petukhov Nikolay
2006-01-03 17:55 ` Tony Lindgren
2006-01-06 19:37 ` [PATCH] " Dirk Behme
2006-01-16 8:28 ` palmtt2
2006-01-20 18:43 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox