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: 14793 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7AC7123E1A for ; Thu, 14 Feb 2013 09:27:10 +0000 (UTC) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by fiordland.canonical.com (Postfix) with ESMTP id 0148CA185A2 for ; Thu, 14 Feb 2013 09:27:09 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id da11so1842272veb.24 for ; Thu, 14 Feb 2013 01:27:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-virus-scanned:message-id:date:from:organization :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding :x-antiabuse:x-antiabuse:x-antiabuse:x-antiabuse:x-antiabuse :x-get-message-sender-via:x-gm-message-state; bh=sf3eB+meTExSj5tumm8W1AoBK0/9T0eQ5E8CZA328uk=; b=kIaajbtH6D4nBGFwHxmly9LGgqXozQWCJvgbtXAGu7/4nWQ/aKcH75l91TL8ilXrK9 4jz0agmUD41rgzFMtTY/havrvLuokkLv7D4LATlxLQUQTyug9018e7ucxjGNePgC/rH+ tMWAa3aOamtcPbihv5pyTWcdkBkHXbTNwpvZJDBt5a/ICpUd68fRN87FTpm/CC7r9isb wTCy4MSvtr5jsspaNyIH3FZTgKt1Up8FPfRI/M9ppTfGYD0X6Ac6fFNjQYKDS0Yot4tz 7OLXGo1egKCH3P97XNuyhWoP1R1XbiAiOl9Q4R95Sv3oaowZchQUgo5mv3YbxVsoG2RB Idbg== X-Received: by 10.52.33.167 with SMTP id s7mr24196756vdi.52.1360834029457; Thu, 14 Feb 2013 01:27:09 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp249177vcb; Thu, 14 Feb 2013 01:27:08 -0800 (PST) X-Received: by 10.60.32.67 with SMTP id g3mr18709550oei.77.1360834028433; Thu, 14 Feb 2013 01:27:08 -0800 (PST) Received: from compulab.co.il (softlayer.compulab.co.il. [50.23.254.55]) by mx.google.com with ESMTPS id h4si49732576obn.206.2013.02.14.01.27.08 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Feb 2013 01:27:08 -0800 (PST) Received-SPF: pass (google.com: domain of grinberg@compulab.co.il designates 50.23.254.55 as permitted sender) client-ip=50.23.254.55; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grinberg@compulab.co.il designates 50.23.254.55 as permitted sender) smtp.mail=grinberg@compulab.co.il 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 CC: Russell King - ARM Linux , =?windows-1252?Q?Marek_Va=9Aut?= , Robert Jarzmik , daniel@caiaq.de, "linux-arm-kernel@lists.infradead.org" , Linus Walleij , Grant Likely , cxie4@marvell.com, Patch Tracking 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 - linaro.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-Gm-Message-State: ALoCoQkycsOovpYIGc6Y23qkjU+MAIbbgdypw2t+C+jZfhX4weuRv9iTG3/inJcyQ6p6nwAL1OVt 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); }