From patchwork Fri Mar 28 17:59:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 3906311 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 36B7E9F2E8 for ; Fri, 28 Mar 2014 18:03:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CF7A20272 for ; Fri, 28 Mar 2014 18:03:28 +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 1F1242028D for ; Fri, 28 Mar 2014 18:03:27 +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 1WTb5x-0001RT-Oh; Fri, 28 Mar 2014 18:01:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTb5W-0007d7-4N; Fri, 28 Mar 2014 18:01:06 +0000 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTb4N-0007RB-Pc for linux-arm-kernel@lists.infradead.org; Fri, 28 Mar 2014 18:00:06 +0000 Received: by mail-wi0-f178.google.com with SMTP id bs8so1033974wib.17 for ; Fri, 28 Mar 2014 10:59:33 -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=fvcAlpw17G+KYFUpX40mbVQXhUyRxUaw6koik1el/cY=; b=q7gjx+RkfZUDNUST80/m8dfJCs0G1yjFD9x2k7BNmO9KdHTxWyYEglN1EIqrhttusK nFxdyDkEdHjY5gmc9WpgbuWGnlRNqWdX3LyNO0UeUckBysZn+DQlJr79f36yZJyofUnU xlab+fK8j6gPjHzn8M00PHveMC5mjE2E7r0Dz0z0Bmzz7sSQC9H0A0p83lNfiIdG0A71 p6iDJM1Qh6syB7DY/RfUu6hLxb6MB8fLcxXNh2RABAP9eu7Tu5ljWo9G3JjsxbGCjS9p ARWitH7I+Py/j33jnuDesuZaw0UtJ4YclHQOrWcD3StUtGSRALNbt1J7BNoYLcPv1lxs Eteg== X-Received: by 10.180.103.134 with SMTP id fw6mr14256577wib.8.1396029573808; Fri, 28 Mar 2014 10:59:33 -0700 (PDT) Received: from localhost.localdomain (col31-4-88-188-80-5.fbx.proxad.net. [88.188.80.5]) by mx.google.com with ESMTPSA id mw3sm9217422wic.7.2014.03.28.10.59.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 10:59:32 -0700 (PDT) From: Boris BREZILLON To: Rob Landley , Nicolas Ferre , Jean-Christophe Plagniol-Villard , Thomas Gleixner Subject: [RFC PATCH v2 05/10] ARM: at91: make use of the new AIC driver for dt enabled boards Date: Fri, 28 Mar 2014 18:59:03 +0100 Message-Id: <1396029548-10928-6-git-send-email-b.brezillon.dev@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396029548-10928-1-git-send-email-b.brezillon.dev@gmail.com> References: <1396029548-10928-1-git-send-email-b.brezillon.dev@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140328_135956_178262_23EE9B06 X-CRM114-Status: GOOD ( 14.96 ) X-Spam-Score: -2.0 (--) Cc: devicetree@vger.kernel.org, Boris BREZILLON , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.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 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 Add a new Kconfig option for the new AIC driver (drivers/irqchip/irq-atmel-aic.c) and remove selection of OLD_IRQ_AT91 when selecting dt boards. Remove specific irq init code in all dt board files: this init procedure is automatically handled in of_irq_init which is called by the arm irq core code and is in charge of calling the appropriate aic init functions. Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/Kconfig | 10 +++++++--- arch/arm/mach-at91/board-dt-rm9200.c | 13 ------------- arch/arm/mach-at91/board-dt-sam9.c | 14 -------------- arch/arm/mach-at91/board-dt-sama5.c | 13 ------------- 4 files changed, 7 insertions(+), 43 deletions(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 4f0b3e0..7e75c4d 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -32,6 +32,13 @@ config OLD_IRQ_AT91 bool default false +config ATMEL_AIC_IRQ + bool + default USE_OF + select GENERIC_IRQ_CHIP + select IRQ_DOMAIN + select MULTI_IRQ_HANDLER + config AT91_SAM9_ALT_RESET bool default !ARCH_AT91X40 @@ -193,7 +200,6 @@ config MACH_AT91RM9200_DT bool "Atmel AT91RM9200 Evaluation Kits with device-tree support" depends on SOC_AT91RM9200 select USE_OF - select OLD_IRQ_AT91 help Select this if you want to experiment device-tree with an Atmel RM9200 Evaluation Kit. @@ -202,7 +208,6 @@ config MACH_AT91SAM9_DT bool "Atmel AT91SAM Evaluation Kits with device-tree support" depends on SOC_AT91SAM9 select USE_OF - select OLD_IRQ_AT91 help Select this if you want to experiment device-tree with an Atmel Evaluation Kit. @@ -211,7 +216,6 @@ config MACH_SAMA5_DT bool "Atmel SAMA5 Evaluation Kits with device-tree support" depends on SOC_SAMA5 select USE_OF - select OLD_IRQ_AT91 select PHYLIB if NETDEVICES help Select this if you want to experiment device-tree with diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c index 3a185fa..61ea214 100644 --- a/arch/arm/mach-at91/board-dt-rm9200.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c @@ -24,17 +24,6 @@ #include "at91_aic.h" #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 const char *at91rm9200_dt_board_compat[] __initdata = { "atmel,at91rm9200", NULL @@ -43,8 +32,6 @@ static const char *at91rm9200_dt_board_compat[] __initdata = { DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") .init_time = at91rm9200_timer_init, .map_io = at91_map_io, - .handle_irq = at91_aic_handle_irq, .init_early = at91rm9200_dt_initialize, - .init_irq = at91rm9200_dt_init_irq, .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 3dab868..d4073c0 100644 --- a/arch/arm/mach-at91/board-dt-sam9.c +++ b/arch/arm/mach-at91/board-dt-sam9.c @@ -20,22 +20,10 @@ #include #include -#include "at91_aic.h" #include "board.h" #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 const char *at91_dt_board_compat[] __initdata = { "atmel,at91sam9", NULL @@ -45,8 +33,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") /* Maintainer: Atmel */ .init_time = at91sam926x_pit_init, .map_io = at91_map_io, - .handle_irq = at91_aic_handle_irq, .init_early = at91_dt_initialize, - .init_irq = at91_dt_init_irq, .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 075ec05..d6fe04b 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c @@ -35,17 +35,6 @@ static void __init sama5_dt_timer_init(void) at91sam926x_pit_init(); } -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; @@ -82,9 +71,7 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)") /* Maintainer: Atmel */ .init_time = sama5_dt_timer_init, .map_io = at91_map_io, - .handle_irq = at91_aic5_handle_irq, .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