From patchwork Wed Mar 20 11:41:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2306971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id CF26CDF24C for ; Wed, 20 Mar 2013 11:45:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIHPC-00055R-Nc; Wed, 20 Mar 2013 11:42:06 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIHOa-0004xg-JY for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2013 11:41:31 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0M4miX-1Ucrkt0iD7-00yiRp; Wed, 20 Mar 2013 12:41:22 +0100 From: Arnd Bergmann To: Barry Song Subject: [PATCH 2/8] ARM: sirf: fix prima2 interrupt lookup Date: Wed, 20 Mar 2013 12:41:13 +0100 Message-Id: <1363779679-16880-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1363779679-16880-1-git-send-email-arnd@arndb.de> References: <1363779679-16880-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:q6png1YgZbEYc5PyaRZEmLdiIyn4QZ2dy2hpwkxBvSS nQ7wEYunXtdmr7uvXQm/wSzPr2zSujSKcdD9tWq8dx8kKSVL7O J/Bx77A6KqBvBihdjHq9P0ctQFgI3ljPC6I6cOpJKZHEtRLrJl OtHIGSlbjdxcavkHGwRggy40jXW9Dzg6NdXB8gf1Ik8o/GTqcw ygr/SyCgMRG4m2xJ8gWVmYVE1IoozzCTnRa78moweqGkuB8Tc8 8tp5IxcDI36LeLOrEQJzfUZXspn3nRayoCPrG2lSHo+lJHe1Sk Dfi5/DNoIDhsSIKs4020iXf9tIb1HpRU2pTgz6SDECepBziRhK uo4ngY0alrvgaakVuk8kZVK8p7ejz2+eOSaoECzZK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130320_074128_910465_65C08BD6 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.9 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: olof@lixom.net, Arnd Bergmann , workgroup.linux@csr.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We must not read the interrupts property manually but instead use irq_of_parse_and_map() to guarantee that we get the correct interrupt number once we stop using the legacy IRQ domain. Signed-off-by: Arnd Bergmann Tested-by: Barry Song --- arch/arm/mach-prima2/timer-prima2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-prima2/timer-prima2.c b/arch/arm/mach-prima2/timer-prima2.c index 6da584f..9829083 100644 --- a/arch/arm/mach-prima2/timer-prima2.c +++ b/arch/arm/mach-prima2/timer-prima2.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -223,7 +224,6 @@ static struct of_device_id timer_ids[] = { static void __init sirfsoc_of_timer_map(void) { struct device_node *np; - const unsigned int *intspec; np = of_find_matching_node(NULL, timer_ids); if (!np) @@ -233,9 +233,7 @@ static void __init sirfsoc_of_timer_map(void) panic("unable to map timer cpu registers\n"); /* Get the interrupts property */ - intspec = of_get_property(np, "interrupts", NULL); - BUG_ON(!intspec); - sirfsoc_timer_irq.irq = be32_to_cpup(intspec); + sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0); of_node_put(np); }