From patchwork Thu Feb 14 09:27:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Grinberg X-Patchwork-Id: 2140891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 922013FCFC for ; Thu, 14 Feb 2013 09:30:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5v61-0006Dd-2l; Thu, 14 Feb 2013 09:27:13 +0000 Received: from softlayer.compulab.co.il ([50.23.254.55] helo=compulab.co.il) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5v5x-0006DL-9K for linux-arm-kernel@lists.infradead.org; Thu, 14 Feb 2013 09:27:10 +0000 Received: from [82.166.188.245] (port=5729 helo=zimbra-mta.compulab.co.il) by softlayer.compulab.co.il with esmtp (Exim 4.80) (envelope-from ) id 1U5v5t-0002P0-3K; Thu, 14 Feb 2013 11:27:05 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 71FEF644195; Thu, 14 Feb 2013 11:27:04 +0200 (IST) X-Virus-Scanned: amavisd-new at compulab.co.il Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ns8-1ymlxuQh; Thu, 14 Feb 2013 11:27:03 +0200 (IST) Received: from [10.1.1.13] (grinberg-pc.compulab.local [10.1.1.13]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 64E98644194; Thu, 14 Feb 2013 11:27:03 +0200 (IST) Message-ID: <511CADE4.1000007@compulab.co.il> Date: Thu, 14 Feb 2013 11:27:00 +0200 From: Igor Grinberg Organization: CompuLab Ltd. User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130123 Thunderbird/17.0.2 MIME-Version: 1.0 To: Haojian Zhuang Subject: Re: [PATCH v2 02/10] gpio: pxa: avoid to use global irq base References: <1359886551-20950-1-git-send-email-haojian.zhuang@linaro.org> <1359886551-20950-3-git-send-email-haojian.zhuang@linaro.org> <511BA0AF.8040904@compulab.co.il> In-Reply-To: X-Enigmail-Version: 1.5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - softlayer.compulab.co.il X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Get-Message-Sender-Via: softlayer.compulab.co.il: acl_c_relayhosts_text_entry: grinberg@compulab.co.il|compulab.co.il X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130214_042709_376318_37DBB5DC X-CRM114-Status: GOOD ( 17.12 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King - ARM Linux , Patch Tracking , Linus Walleij , Grant Likely , =?windows-1252?Q?Marek_Va=9Aut?= , cxie4@marvell.com, daniel@caiaq.de, Robert Jarzmik , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 02/13/13 16:55, Haojian Zhuang wrote: > On 13 February 2013 22:18, Igor Grinberg 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 >> >> 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: 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? 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); }