From patchwork Thu May 23 15:48:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 2608011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 6789EDFB78 for ; Thu, 23 May 2013 15:50:01 +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 1UfXlw-00075a-Mv; Thu, 23 May 2013 15:49:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UfXlo-00019j-6h; Thu, 23 May 2013 15:49:36 +0000 Received: from 5.mo2.mail-out.ovh.net ([87.98.181.248] helo=mo2.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UfXlY-00016x-Mj for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2013 15:49:22 +0000 Received: from mail431.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo2.mail-out.ovh.net (Postfix) with SMTP id A252EDC23D8 for ; Thu, 23 May 2013 17:48:57 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 23 May 2013 17:51:47 +0200 Received: from unknown (HELO bbrezillon-laptop) (80.245.18.66) by ns0.ovh.net with SMTP; 23 May 2013 17:51:46 +0200 Received: from bbrezillon by bbrezillon-laptop with local (Exim 4.76) (envelope-from ) id 1UfXl9-000888-Vn; Thu, 23 May 2013 17:48:56 +0200 From: Boris BREZILLON To: Andrew Victor , Nicolas Ferre , Jean-Christophe Plagniol-Villard , Thomas Gleixner X-Ovh-Mailout: 178.32.228.2 (mo2.mail-out.ovh.net) Subject: [PATCH v2 3/3] ARM: at91: use IRQCHIP_DECLARE instead of machine specific init_irq Date: Thu, 23 May 2013 17:48:55 +0200 Message-Id: <1369324135-31211-4-git-send-email-b.brezillon@overkiz.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1369324135-31211-1-git-send-email-b.brezillon@overkiz.com> References: <1369324135-31211-1-git-send-email-b.brezillon@overkiz.com> X-Ovh-Tracer-Id: 4256464598644274252 X-Ovh-Remote: 80.245.18.66 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiiedrtddtucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiiedrtddtucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130523_114920_992102_26604698 X-CRM114-Status: GOOD ( 16.14 ) 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 [87.98.181.248 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-kernel@vger.kernel.org, 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 Replace machine specific init_irq functions with IRQCHIP_DECLARE. Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/board-dt-rm9200.c | 11 ----------- arch/arm/mach-at91/board-dt-sam9.c | 12 ------------ arch/arm/mach-at91/board-dt-sama5.c | 12 ------------ arch/arm/mach-at91/generic.h | 5 ----- drivers/irqchip/irq-at91.c | 4 ++++ 5 files changed, 4 insertions(+), 40 deletions(-) diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c index 67fff54..7ee7e5f 100644 --- a/arch/arm/mach-at91/board-dt-rm9200.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c @@ -26,16 +26,6 @@ #include "generic.h" -static const struct of_device_id irq_of_match[] __initconst = { - { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, - { /*sentinel*/ } -}; - -static void __init at91rm9200_dt_init_irq(void) -{ - of_irq_init(irq_of_match); -} - static void __init at91rm9200_dt_device_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -50,7 +40,6 @@ DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") .init_time = at91rm9200_timer_init, .map_io = at91_map_io, .init_early = at91rm9200_dt_initialize, - .init_irq = at91rm9200_dt_init_irq, .init_machine = at91rm9200_dt_device_init, .dt_compat = at91rm9200_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c index 65edc6e..e7aa089 100644 --- a/arch/arm/mach-at91/board-dt-sam9.c +++ b/arch/arm/mach-at91/board-dt-sam9.c @@ -26,17 +26,6 @@ #include "generic.h" -static const struct of_device_id irq_of_match[] __initconst = { - - { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, - { /*sentinel*/ } -}; - -static void __init at91_dt_init_irq(void) -{ - of_irq_init(irq_of_match); -} - static void __init at91_dt_device_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -52,7 +41,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") .init_time = at91sam926x_pit_init, .map_io = at91_map_io, .init_early = at91_dt_initialize, - .init_irq = at91_dt_init_irq, .init_machine = at91_dt_device_init, .dt_compat = at91_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index 015178f..b3b6a1b 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c @@ -27,17 +27,6 @@ #include "generic.h" -static const struct of_device_id irq_of_match[] __initconst = { - - { .compatible = "atmel,sama5d3-aic", .data = at91_aic5_of_init }, - { /*sentinel*/ } -}; - -static void __init at91_dt_init_irq(void) -{ - of_irq_init(irq_of_match); -} - static int ksz9021rn_phy_fixup(struct phy_device *phy) { int value; @@ -79,7 +68,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") .init_time = at91sam926x_pit_init, .map_io = at91_map_io, .init_early = at91_dt_initialize, - .init_irq = at91_dt_init_irq, .init_machine = sama5_dt_device_init, .dt_compat = sama5_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 78ab065..23077cf 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -29,11 +29,6 @@ extern void __init at91_init_interrupts(unsigned int priority[]); extern void __init at91x40_init_interrupts(unsigned int priority[]); extern void __init at91_aic_init(unsigned int priority[], unsigned int ext_irq_mask); -extern int __init at91_aic_of_init(struct device_node *node, - struct device_node *parent); -extern int __init at91_aic5_of_init(struct device_node *node, - struct device_node *parent); - /* Timer */ extern void at91rm9200_ioremap_st(u32 addr); diff --git a/drivers/irqchip/irq-at91.c b/drivers/irqchip/irq-at91.c index ca49096..137d428 100644 --- a/drivers/irqchip/irq-at91.c +++ b/drivers/irqchip/irq-at91.c @@ -43,6 +43,8 @@ #include #include +#include "irqchip.h" + void __iomem *at91_aic_base; static struct irq_domain *at91_aic_domain; @@ -473,6 +475,7 @@ int __init at91_aic_of_init(struct device_node *node, return 0; } +IRQCHIP_DECLARE(at91rm9200_aic, "atmel,at91rm9200-aic", at91_aic_of_init); int __init at91_aic5_of_init(struct device_node *node, struct device_node *parent) @@ -497,6 +500,7 @@ int __init at91_aic5_of_init(struct device_node *node, return 0; } +IRQCHIP_DECLARE(sama5d3_aic, "atmel,sama5d3-aic", at91_aic5_of_init); #endif /*