From: Imre Deak <imre.deak@nokia.com>
To: ext Ladislav Michl <michl@2n.cz>
Cc: linux-omap <linux-omap-open-source@linux.omap.com>,
"Yrjola Juha (Nokia-M/Helsinki)" <Juha.Yrjola@nokia.com>
Subject: Re: [RFC] ARM: OMAP: handle lazy IRQ disable properly
Date: Wed, 17 May 2006 21:33:09 +0300 [thread overview]
Message-ID: <446B6C65.7010504@nokia.com> (raw)
In-Reply-To: <446B67EA.7030107@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
Imre Deak wrote:
> Hi,
>
> ext Ladislav Michl wrote:
>> On Sun, 2006-04-02 at 23:04 +0300, Imre Deak wrote:
>>> GPIO IRQs can't be disabled at the moment, since the ARM lazy IRQ
>>> masking is not handled properly by the current GPIO IRQ handler.
>>
>> Imre,
>>
>> I updated linux-omap git tree yesterday and found that it no longer
>> boots on VoiceBlue (5910) board; smc91x driver doesn't get any
>> interrupts. Reverting following commit made it work again.
>>
>> diff-tree e829dc78d9908b3949c2994b331c5279049b9098 Author: Imre Deak
>> <imre.deak@nokia.com>
>> Date: Thu May 11 16:13:42 2006 +0300
>>
>> ARM: OMAP: GPIO IRQ lazy IRQ disable fix
>>
>> It is not exactly the same as the one you provided here, but it seems it
>> is based on it.
>
> I missed the fact that some OMAPs have IRQ mask others IRQ enable
> register.. Could you try it with the attached patch?
>
Or rather this one. Have to check the bank size as well and invert properly.
--Imre
>
>>
>> Best regards,
>> ladis
>
[-- Attachment #2: omap-gpio_irq_mask-patch.diff --]
[-- Type: text/plain, Size: 1071 bytes --]
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index cd1e508..beb1e1a 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -540,29 +540,44 @@ static inline void _clear_gpio_irqstatus
static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank)
{
void __iomem *reg = bank->base;
+ int inv = 0;
+ u32 l;
+ u32 mask;
switch (bank->method) {
case METHOD_MPUIO:
reg += OMAP_MPUIO_GPIO_MASKIT;
+ mask = 0x0f;
+ inv = 1;
break;
case METHOD_GPIO_1510:
reg += OMAP1510_GPIO_INT_MASK;
+ mask = 0x0f;
+ inv = 1;
break;
case METHOD_GPIO_1610:
reg += OMAP1610_GPIO_IRQENABLE1;
+ mask = 0x0f;
break;
case METHOD_GPIO_730:
reg += OMAP730_GPIO_INT_MASK;
+ mask = 0xff;
+ inv = 1;
break;
case METHOD_GPIO_24XX:
reg += OMAP24XX_GPIO_IRQENABLE1;
+ mask = 0xff;
break;
default:
BUG();
return 0;
}
- return __raw_readl(reg);
+ l = __raw_readl(reg);
+ if (inv)
+ l = ~l;
+ l &= mask;
+ return l;
}
static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable)
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2006-05-17 18:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-02 20:04 [RFC] ARM: OMAP: handle lazy IRQ disable properly Imre Deak
[not found] ` <1147882410.22799.5.camel@orphique>
2006-05-17 18:14 ` Imre Deak
2006-05-17 18:33 ` Imre Deak [this message]
2006-05-24 11:55 ` [PATCH] ARM: OMAP: fix GPIO IRQ mask handling [was Re: [RFC] ARM: OMAP: handle lazy IRQ disable properly] Imre Deak
2006-05-26 22:59 ` Tony Lindgren
2006-05-27 0:22 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446B6C65.7010504@nokia.com \
--to=imre.deak@nokia.com \
--cc=Juha.Yrjola@nokia.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=michl@2n.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.