From patchwork Fri Dec 13 02:27:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Yanovich X-Patchwork-Id: 3336101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5B519C0D4A for ; Fri, 13 Dec 2013 02:31:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B9C1207D1 for ; Fri, 13 Dec 2013 02:31:45 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 99D3B20670 for ; Fri, 13 Dec 2013 02:31:44 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrIW9-0002DE-6J; Fri, 13 Dec 2013 02:30:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrIVh-0000GI-FR; Fri, 13 Dec 2013 02:29:49 +0000 Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrIVA-0000BR-Rn for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2013 02:29:18 +0000 Received: by mail-la0-f50.google.com with SMTP id el20so923986lab.37 for ; Thu, 12 Dec 2013 18:28:54 -0800 (PST) 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=daLC1ki37DuVexdNol1I3TozoGDfqx9TwnlTVEL2gMc=; b=sflxswRKx6ykRWVzrkbkdmpukWJR5SXLvr6raqOnu3+l3cnCD1d90uFVhHjyAJBEmz YC4jvBnIlXs9RGQO+37R5tB0q2SGQLgg9LGdgcASWRVps/Ju9TvOKUhIN+wy4GRMUPIy HL1TbiyzdFViLTdrBvnNPT4Sljvf3ud6aCtFQBlRx2W+cjdz0MLD5uDwhD9vIxqYukCI deWblbbyLr7JUnsCh86CqGEa4/EdhuowsLllqMQCMdlJcNw3EibbL73KCBr38hAxBS+1 lckq0KbpbERL7Lzmf8q8T2bnfF/SfN+e83sEi1pb/r1qXCHZHJa5mM5FnWGpvfcTF2N0 B1Cw== X-Received: by 10.152.170.199 with SMTP id ao7mr60464lac.40.1386901734627; Thu, 12 Dec 2013 18:28:54 -0800 (PST) Received: from host5.omatika.ru (0893675324.static.corbina.ru. [95.31.1.192]) by mx.google.com with ESMTPSA id e10sm809634laa.6.2013.12.12.18.28.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2013 18:28:54 -0800 (PST) From: Sergei Ianovich To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 05/16] ARM: dts: pxa27x: irq init using device tree Date: Fri, 13 Dec 2013 06:27:14 +0400 Message-Id: <1386901645-28895-6-git-send-email-ynvich@gmail.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1386901645-28895-1-git-send-email-ynvich@gmail.com> References: <1386543229-1542-1-git-send-email-ynvich@gmail.com> <1386901645-28895-1-git-send-email-ynvich@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_212917_102470_7C402803 X-CRM114-Status: GOOD ( 13.03 ) X-Spam-Score: -1.9 (-) 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=-3.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SBL, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no 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: Arnd Bergmann --- 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)); }