From: eric@eukrea•com (Eric Bénard)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/3] i.MX51: handle IRQ for gpio 16..31
Date: Wed, 21 Jul 2010 11:08:31 +0200 [thread overview]
Message-ID: <4C46B90F.9070200@eukrea.com> (raw)
In-Reply-To: <1279703092.5412.47.camel@ra7055-laptop>
Hi Rob,
Le 21/07/2010 11:04, Rob Herring a ?crit :
> On Tue, 2010-07-20 at 09:16 +0200, Eric B?nard wrote:
>> The i.MX51 generates 2 IRQ for each GPIO bank : one for gpio 0 to 15
>> and one for gpio 16 to 31.
>> Actually only the lower IRQ is registered so register the second one.
>>
>> Signed-off-by: Eric B?nard<eric@eukrea•com>
>> ---
>> arch/arm/plat-mxc/gpio.c | 6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
>> index 71437c6..7e64bba 100644
>> --- a/arch/arm/plat-mxc/gpio.c
>> +++ b/arch/arm/plat-mxc/gpio.c
>> @@ -293,6 +293,12 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
>> set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler);
>> set_irq_data(port[i].irq,&port[i]);
>> }
>> + if (cpu_is_mx51()) {
>> + /* setup handler for GPIO 16 to 31 */
>> + set_irq_chained_handler(port[i].irq + 1,
>> + mx3_gpio_irq_handler);
>> + set_irq_data(port[i].irq + 1,&port[i]);
>
> This is making an assumption that the high irq line is 1 more than low
> one. There is no guarantee this will always be true. This will also then
> require change when adding MX53 support and other new chips in the
> pipeline.
>
> Adding irq_high field to struct mxc_gpio_port and setting up the handler
> when it is non-zero will avoid a cpu_is_x.
>
OK, I'll update the patch this way.
Thanks,
Eric
next prev parent reply other threads:[~2010-07-21 9:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 7:16 [PATCH 1/3] i.MX51: handle IRQ for gpio 16..31 Eric Bénard
2010-07-20 7:16 ` [PATCH 2/3] iomux-mx51: add 4 pin definitions Eric Bénard
2010-07-20 7:16 ` [PATCH 3/3] i.MX51: add support for cpuimx51 module and its baseboard Eric Bénard
2010-07-21 4:42 ` Baruch Siach
2010-07-21 7:17 ` [PATCH v2 " Eric Bénard
2010-07-22 13:31 ` [PATCH " Sascha Hauer
2010-07-22 14:27 ` Eric Bénard
2010-07-23 14:11 ` [PATCH v3] " Eric Bénard
2010-07-21 9:04 ` [PATCH 1/3] i.MX51: handle IRQ for gpio 16..31 Rob Herring
2010-07-21 9:08 ` Eric Bénard [this message]
2010-07-21 12:46 ` [PATCH v2 " Eric Bénard
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=4C46B90F.9070200@eukrea.com \
--to=eric@eukrea$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox