From patchwork Sun Aug 14 22:24:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 9280191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E797260839 for ; Sun, 14 Aug 2016 22:27:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C20A6289FA for ; Sun, 14 Aug 2016 22:27:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A383528A1A; Sun, 14 Aug 2016 22:27:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40E8A289FA for ; Sun, 14 Aug 2016 22:27:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZ3qa-00050J-U6; Sun, 14 Aug 2016 22:25:36 +0000 Received: from smtp11.smtpout.orange.fr ([80.12.242.133] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZ3qW-0004py-7y for linux-arm-kernel@lists.infradead.org; Sun, 14 Aug 2016 22:25:34 +0000 Received: from belgarion.home ([109.222.82.242]) by mwinf5d89 with ME id XAR11t0065DhqKR03AR2PW; Mon, 15 Aug 2016 00:25:06 +0200 X-ME-Helo: belgarion.home X-ME-Date: Mon, 15 Aug 2016 00:25:06 +0200 X-ME-IP: 109.222.82.242 From: Robert Jarzmik To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Subject: [PATCH] ARM: pxa: remove irq init from dt machines Date: Mon, 15 Aug 2016 00:24:55 +0200 Message-Id: <1471213495-2315-1-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160814_152532_803367_C44244D9 X-CRM114-Status: GOOD ( 12.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The init_irq and handle_irq can be declared through standard irqchip declaration and are not necessary in machine descriptions. This is another step towards the generic kernel for the pxa architecture. Signed-off-by: Robert Jarzmik Cc: Arnd Bergmann Acked-by: Arnd Bergmann --- arch/arm/mach-pxa/generic.h | 3 --- arch/arm/mach-pxa/pxa-dt.c | 6 ------ arch/arm/mach-pxa/pxa25x.c | 11 ++++++++--- arch/arm/mach-pxa/pxa27x.c | 11 ++++++++--- arch/arm/mach-pxa/pxa3xx.c | 8 +++++++- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 3f914d97cac2..75e3f611e5d8 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h @@ -27,21 +27,18 @@ extern void pxa_timer_init(void); #define pxa25x_handle_irq icip_handle_irq extern int __init pxa25x_clocks_init(void); -extern void __init pxa25x_dt_init_irq(void); extern void __init pxa25x_init_irq(void); extern void __init pxa25x_map_io(void); extern void __init pxa26x_init_irq(void); #define pxa27x_handle_irq ichp_handle_irq extern int __init pxa27x_clocks_init(void); -extern void __init pxa27x_dt_init_irq(void); extern unsigned pxa27x_get_clk_frequency_khz(int); extern void __init pxa27x_init_irq(void); extern void __init pxa27x_map_io(void); #define pxa3xx_handle_irq ichp_handle_irq extern int __init pxa3xx_clocks_init(void); -extern void __init pxa3xx_dt_init_irq(void); extern void __init pxa3xx_init_irq(void); extern void __init pxa3xx_map_io(void); diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c index 3e331e61f995..aa9b255f5570 100644 --- a/arch/arm/mach-pxa/pxa-dt.c +++ b/arch/arm/mach-pxa/pxa-dt.c @@ -26,8 +26,6 @@ static const char * const pxa25x_dt_board_compat[] __initconst = { DT_MACHINE_START(PXA25X_DT, "Marvell PXA25x (Device Tree Support)") .map_io = pxa25x_map_io, - .init_irq = pxa25x_dt_init_irq, - .handle_irq = pxa25x_handle_irq, .restart = pxa_restart, .dt_compat = pxa25x_dt_board_compat, MACHINE_END @@ -41,8 +39,6 @@ static const char * const pxa27x_dt_board_compat[] __initconst = { DT_MACHINE_START(PXA27X_DT, "Marvell PXA27x (Device Tree Support)") .map_io = pxa27x_map_io, - .init_irq = pxa27x_dt_init_irq, - .handle_irq = pxa27x_handle_irq, .restart = pxa_restart, .dt_compat = pxa27x_dt_board_compat, MACHINE_END @@ -58,8 +54,6 @@ static const char *const pxa3xx_dt_board_compat[] __initconst = { DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)") .map_io = pxa3xx_map_io, - .init_irq = pxa3xx_dt_init_irq, - .handle_irq = pxa3xx_handle_irq, .restart = pxa_restart, .dt_compat = pxa3xx_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 30b4270adc02..12b94357fbc1 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -151,11 +152,15 @@ void __init pxa26x_init_irq(void) } #endif -void __init pxa25x_dt_init_irq(void) +static int __init __init +pxa25x_dt_init_irq(struct device_node *node, struct device_node *parent) { - if (IS_ENABLED(CONFIG_OF)) - pxa_dt_irq_init(pxa25x_set_wake); + pxa_dt_irq_init(pxa25x_set_wake); + set_handle_irq(ichp_handle_irq); + + return 0; } +IRQCHIP_DECLARE(pxa25x_intc, "marvell,pxa-intc", pxa25x_dt_init_irq); static struct map_desc pxa25x_io_desc[] __initdata = { { /* Mem Ctl */ diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index f0262ff0e5ef..918fd6312502 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -233,11 +234,15 @@ void __init pxa27x_init_irq(void) pxa_init_irq(34, pxa27x_set_wake); } -void __init pxa27x_dt_init_irq(void) +static int __init +pxa27x_dt_init_irq(struct device_node *node, struct device_node *parent) { - if (IS_ENABLED(CONFIG_OF)) - pxa_dt_irq_init(pxa27x_set_wake); + pxa_dt_irq_init(pxa27x_set_wake); + set_handle_irq(ichp_handle_irq); + + return 0; } +IRQCHIP_DECLARE(pxa27x_intc, "marvell,pxa-intc", pxa27x_dt_init_irq); static struct map_desc pxa27x_io_desc[] __initdata = { { /* Mem Ctl */ diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 6a014c8d8a47..87acc96388c7 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -356,11 +357,16 @@ void __init pxa3xx_init_irq(void) } #ifdef CONFIG_OF -void __init pxa3xx_dt_init_irq(void) +static int __init __init +pxa3xx_dt_init_irq(struct device_node *node, struct device_node *parent) { __pxa3xx_init_irq(); pxa_dt_irq_init(pxa3xx_set_wake); + set_handle_irq(ichp_handle_irq); + + return 0; } +IRQCHIP_DECLARE(pxa3xx_intc, "marvell,pxa-intc", pxa3xx_dt_init_irq); #endif /* CONFIG_OF */ static struct map_desc pxa3xx_io_desc[] __initdata = {