From patchwork Wed Apr 16 17:13:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Yanovich X-Patchwork-Id: 4003061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 149349F2CC for ; Wed, 16 Apr 2014 17:17:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4324620375 for ; Wed, 16 Apr 2014 17:17:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77C1E20374 for ; Wed, 16 Apr 2014 17:17:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaTQe-0000wW-40; Wed, 16 Apr 2014 17:15:20 +0000 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaTQ8-0007l7-T2 for linux-arm-kernel@lists.infradead.org; Wed, 16 Apr 2014 17:14:49 +0000 Received: by mail-lb0-f182.google.com with SMTP id n15so8294879lbi.41 for ; Wed, 16 Apr 2014 10:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i3tqhPuxZGjUWFhNt6nLRkgT92NINl8iCepkD2S6oJc=; b=A2jpWQarmQiG3FCM3CV9bNXt8GmPYH1pgdIFXeS3QAOCKWCwF3tQfFG+z0mKh+eaJj 88PahBKDkCz82m9cQeeeht/FAO2Giv6V+vaf7V+PpJo12GL+WkbOYsbtP5xPwj+O8OO5 fr5Tu5W7osJW4DhcH5zF+W0Om5ulRL3lgiAN1yAmEySZkJ1BQK2oTd2h0uCB14hc2FLJ XgHnI4bP662acA5M8hG/2YsBSYc1iG7gC8a/3FUFxnVV87ePNMVzXeu38Xd3S6/pdrkU 7lP2CxoMl3Kj1TTkZ+3W69pYHoJVn5FBNlXmqxAipeGB5Lxz5sOG4bzE0Z81c/Ow4B7i lqLQ== X-Received: by 10.152.2.131 with SMTP id 3mr6186968lau.20.1397668465955; Wed, 16 Apr 2014 10:14:25 -0700 (PDT) Received: from host5.omatika.ru (0893675324.static.corbina.ru. [95.31.1.192]) by mx.google.com with ESMTPSA id jp6sm21178322lbc.15.2014.04.16.10.14.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Apr 2014 10:14:25 -0700 (PDT) From: Sergei Ianovich To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 05/21] ARM: dts: pxa27x: irq init using device tree Date: Wed, 16 Apr 2014 21:13:15 +0400 Message-Id: <1397668411-27162-6-git-send-email-ynvich@gmail.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1397668411-27162-1-git-send-email-ynvich@gmail.com> References: <1387309071-22382-1-git-send-email-ynvich@gmail.com> <1397668411-27162-1-git-send-email-ynvich@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140416_101449_142260_56EA2507 X-CRM114-Status: GOOD ( 12.83 ) X-Spam-Score: -0.1 (/) Cc: Russell King , Arnd Bergmann , Haojian Zhuang , Daniel Mack , Sergei Ianovich , Eric Miao 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 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sergei Ianovich CC: Daniel Mack CC: Haojian Zhuang CC: Arnd Bergmann --- v3..v4 v2..v3 * no changes v1..v2 * use of_have_populated_dt() instead of a static variable * drop #ifdef in header file * number changed from 8 to 5 (dropped patches) arch/arm/mach-pxa/include/mach/pxa27x.h | 1 + arch/arm/mach-pxa/pxa27x.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-pxa/include/mach/pxa27x.h b/arch/arm/mach-pxa/include/mach/pxa27x.h index 7cff640..34a4d6f 100644 --- a/arch/arm/mach-pxa/include/mach/pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/pxa27x.h @@ -23,6 +23,7 @@ extern void __init pxa27x_map_io(void); extern void __init pxa27x_init_irq(void); extern int __init pxa27x_set_pwrmode(unsigned int mode); extern void pxa27x_cpu_pm_enter(suspend_state_t state); +extern void __init pxa27x_dt_init_irq(void); #define pxa27x_handle_irq ichp_handle_irq diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 301471a..c6b54f8 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -398,6 +398,13 @@ void __init pxa27x_init_irq(void) pxa_init_irq(34, pxa27x_set_wake); } +#ifdef CONFIG_OF +void __init pxa27x_dt_init_irq(void) +{ + pxa_dt_irq_init(pxa27x_set_wake); +} +#endif /* CONFIG_OF */ + static struct map_desc pxa27x_io_desc[] __initdata = { { /* Mem Ctl */ .virtual = (unsigned long)SMEMC_VIRT, @@ -471,6 +478,9 @@ static int __init pxa27x_init(void) register_syscore_ops(&pxa2xx_mfp_syscore_ops); register_syscore_ops(&pxa2xx_clock_syscore_ops); + if (of_have_populated_dt()) + return 0; + pxa_register_device(&pxa27x_device_gpio, &pxa27x_gpio_info); ret = platform_add_devices(devices, ARRAY_SIZE(devices)); }