From patchwork Wed Dec 19 14:42:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13659 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 7D26823E2A for ; Wed, 19 Dec 2012 14:43:18 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by fiordland.canonical.com (Postfix) with ESMTP id 2F608A18B9A for ; Wed, 19 Dec 2012 14:43:18 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id 13so2810795iea.35 for ; Wed, 19 Dec 2012 06:43:17 -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:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=JNUW8CD6D7TiIigorLaC+6Z1uXh0K+UBPvdyB96Cx1A=; b=AR/vhai8/tzi5YeITJmOCJptrbYFKA5FJJotzZxPGiaknlqBU8+gl6lwhR7dP4yDtd d9oQBPBMJr3boSWxoU0BSLxv6GkIc4yyE7cJUQee32mPNpB8r+y0OperVUyob0YCXhoj h6xf8iravAu44/nDDIvnTuCQG7hHj603eD2R9NhGKestfnyI2jxxqOTJjcONwVdN60xs 8DFHOmFREEL9DqIDjNGVfkITnLTx2RO9g9kEwdOGJc94Ox4uKZYJFt+w3gK8fXBnPY9h oN0gRX6YQVaRYuL+QKYcY1CB7qLqYrdhJnuMG0nQwwX0e2CtOYg8rFn6OLvMrvQhwPYs feEg== X-Received: by 10.50.220.166 with SMTP id px6mr7181675igc.8.1355928197462; Wed, 19 Dec 2012 06:43:17 -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.50.67.115 with SMTP id m19csp239517igt; Wed, 19 Dec 2012 06:43:16 -0800 (PST) X-Received: by 10.14.219.3 with SMTP id l3mr14823025eep.5.1355928195409; Wed, 19 Dec 2012 06:43:15 -0800 (PST) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com [207.126.144.131]) by mx.google.com with SMTP id l8si13081986eep.8.2012.12.19.06.43.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 06:43:15 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.131; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUNHSe0EMhWjpAqYMvHW1MmxrXrYmoId9@postini.com; Wed, 19 Dec 2012 14:43:14 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 3270F62; Wed, 19 Dec 2012 14:42:10 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 8FE1164; Wed, 19 Dec 2012 09:27:20 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 834A224C2E6; Wed, 19 Dec 2012 15:42:43 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 19 Dec 2012 15:42:50 +0100 From: Linus Walleij To: Samuel Ortiz , Cc: Anmar Oueja , Linus Walleij , , Lee Jones Subject: [PATCH] mfd: db8500-prcmu: fix irqdomain usage Date: Wed, 19 Dec 2012 15:42:41 +0100 Message-ID: <1355928161-8082-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmxl3r8nUXhjnEUTy14PZ2do5cq+3mZA9/b6KEgfzEQxrmp3nkhR5j8qBTv3t/XZ9pmYQuT From: Linus Walleij This fixes two issues with the DB8500 PRCMU irqdomain: - You have to state the irq base 0 to get a linear domain for the DT case from irq_domain_add_simple() - The irqdomain was not used to translate the initial irq request using irq_create_mapping() making the linear case fail as it was lacking a proper descriptor. I took this opportunity to fix two lines of whitespace errors in related code as I was anyway messing around with it. Cc: stable@kernel.org Cc: Lee Jones Signed-off-by: Linus Walleij --- Hi Sam, this is a regression and as such should go into the -rc series. As you can see I also added the Cc: stable tag. Yours, Linus Walleij --- drivers/mfd/db8500-prcmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index dc8826d..fcac8e0 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2524,7 +2524,7 @@ static bool read_mailbox_0(void) for (n = 0; n < NUM_PRCMU_WAKEUPS; n++) { if (ev & prcmu_irq_bit[n]) - generic_handle_irq(IRQ_PRCMU_BASE + n); + generic_handle_irq(irq_create_mapping(db8500_irq_domain,n)); } r = true; break; @@ -2737,13 +2737,13 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq, } static struct irq_domain_ops db8500_irq_ops = { - .map = db8500_irq_map, - .xlate = irq_domain_xlate_twocell, + .map = db8500_irq_map, + .xlate = irq_domain_xlate_twocell, }; static int db8500_irq_init(struct device_node *np) { - int irq_base = -1; + int irq_base = 0; /* In the device tree case, just take some IRQs */ if (!np)