linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 02/10] gpio: pxa: avoid to use global irq base
Date: Thu, 14 Feb 2013 11:27:00 +0200	[thread overview]
Message-ID: <511CADE4.1000007@compulab.co.il> (raw)
In-Reply-To: <CAD6h2NRO6N1pRfq_=ybj5TSwC7gieYOffcQmfTyUiP5R_3fWig@mail.gmail.com>

On 02/13/13 16:55, Haojian Zhuang wrote:
> On 13 February 2013 22:18, Igor Grinberg <grinberg@compulab.co.il> wrote:
>> On 02/03/13 12:15, Haojian Zhuang wrote:
>>> Avoid to use global irq_base in gpio-pxa driver. Define irq_base in each
>>> pxa_gpio_chip instead. Then we can avoid to use macro PXA_GPIO_TO_IRQ() &
>>> MMP_GPIO_TO_IRQ().
>>>
>>> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
>>
>> Ok. This patch breaks the NFS root on my PXA based systems.
>> I still haven't found the cause of the breakage.
>>
> 
> It's so strange. I tested it OK on pxa910 without DT. Could you help
> to check whether your GPIO interrupt still works?

It looks like I've figured this out...
For em-x270 as an example, if I move the IRQ resource assignment to runtime:

diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 1b64114..178cc0b 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -210,8 +210,6 @@ static struct resource em_x270_dm9000_resource[] = {
 		.flags = IORESOURCE_MEM,
 	},
 	[2] = {
-		.start = EM_X270_ETHIRQ,
-		.end   = EM_X270_ETHIRQ,
 		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
 	}
 };
@@ -232,6 +230,9 @@ static struct platform_device em_x270_dm9000 = {
 
 static void __init em_x270_init_dm9000(void)
 {
+	em_x270_dm9000_resource[2].start = gpio_to_irq(GPIO41_ETHIRQ);
+	em_x270_dm9000_resource[2].end = gpio_to_irq(GPIO41_ETHIRQ);
+
 	em_x270_dm9000_platdata.flags |= dm9000_flags;
 	platform_device_register(&em_x270_dm9000);
 }

The Ethernet is alive and NFS root works fine.

So my conclusion, is that we still need to have some work done
before we can switch to using IRQ_DOMAIN.
As you can see from above patch, we at least must deal with the
PXA_GPIO_TO_IRQ macros and alike that have compile time assumptions
which obviously get broken once you switch to the IRQ_DOMAIN.

What do you think?

-- 
Regards,
Igor.

  reply	other threads:[~2013-02-14  9:27 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 10:15 [PATCH v2 00/10] rework pxa gpio driver for pinctrl Haojian Zhuang
2013-02-03 10:15 ` [PATCH v2 01/10] gpio: pxa: identify ed mask reg with platform data Haojian Zhuang
2013-02-03 10:15 ` [PATCH v2 02/10] gpio: pxa: avoid to use global irq base Haojian Zhuang
2013-02-07 15:17   ` Igor Grinberg
2013-02-13 14:18   ` Igor Grinberg
2013-02-13 14:55     ` Haojian Zhuang
2013-02-14  9:27       ` Igor Grinberg [this message]
2013-02-14 12:19         ` Linus Walleij
2013-02-14 12:45           ` Igor Grinberg
2013-02-14 15:34             ` Linus Walleij
2013-02-17 14:54             ` Haojian Zhuang
2013-02-03 10:15 ` [PATCH v2 03/10] gpio: pxa: use platform data for gpio inverted Haojian Zhuang
2013-02-07 15:17   ` Igor Grinberg
2013-02-03 10:15 ` [PATCH v2 04/10] gpio: pxa: remove gpio_type Haojian Zhuang
2013-02-07 15:17   ` Igor Grinberg
2013-02-03 10:15 ` [PATCH v2 05/10] gpio: pxa: define nr gpios in platform data Haojian Zhuang
2013-02-03 13:18   ` Igor Grinberg
2013-02-03 15:00     ` [PATCH v2 05/11] " Haojian Zhuang
2013-02-07 15:17       ` Igor Grinberg
2013-02-03 15:03     ` [PATCH v2 05/10] " Haojian Zhuang
2013-02-03 10:15 ` [PATCH v2 06/10] gpio: pxa: clean code for compatible name Haojian Zhuang
2013-02-07 15:17   ` Igor Grinberg
2013-02-03 10:15 ` [PATCH v2 07/10] gpio: pxa: remove arch related macro Haojian Zhuang
2013-02-07 15:17   ` Igor Grinberg
2013-02-03 10:15 ` [PATCH v2 08/10] gpio: pxa: move gpio properties into child node Haojian Zhuang
2013-02-03 10:15 ` [PATCH v2 09/10] gpio: pxa: bind to pinctrl by request Haojian Zhuang
2013-02-06 14:11   ` Igor Grinberg
2013-02-07 15:17   ` Igor Grinberg
2013-02-03 10:15 ` [PATCH v2 10/10] ARM: dts: support pinmux in pxa910 Haojian Zhuang
2013-02-06 14:12   ` Igor Grinberg
2013-02-05 16:44 ` [PATCH v2 00/10] rework pxa gpio driver for pinctrl Linus Walleij
2013-02-06  2:08   ` Haojian Zhuang
2013-02-07 15:32     ` Igor Grinberg
2013-02-07 15:52       ` Linus Walleij

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=511CADE4.1000007@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).