From patchwork Thu Jan 3 17:54:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1928691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 3AE2B3FE37 for ; Thu, 3 Jan 2013 18:07:38 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tqp8P-0004Nc-Ch; Thu, 03 Jan 2013 18:03:22 +0000 Received: from mail-gh0-f169.google.com ([209.85.160.169]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tqp0l-0007jD-6p for linux-arm-kernel@lists.infradead.org; Thu, 03 Jan 2013 17:55:33 +0000 Received: by mail-gh0-f169.google.com with SMTP id r11so1825665ghr.28 for ; Thu, 03 Jan 2013 09:55:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=BXUM+aRR2OaPYN+JjjYm0fNGBFIHIpt3BiRxFmch67U=; b=F6I3pA+hKJlv189fhk01IvboiK4kthDpLgOb8dW/f22X6HcYwTsagIVOApAFCsnCt0 NwaH2IqYxpTBWJtX9RFS4ybGdUaNPi1044D2RRXmsJlEaufH5WdyujFehbRULTGOt8Rc 4bsec0eS85hqZdX9j555BMVVFyeDiG+Qkox2OaYSGBcAi/A4CxVc+psP0onKiv65AG8k BPBDoYvGugQUxtWdpk3uXnvQ/g6enjTgcd28cP6NI60e3cbqQiPcFS1BZLKp24++W/+v n9l2zx+vuoAVsfS25WmQQVFEOVqQ6TIIVwGvRMB8xqYBwwGk8PJYo5fnsFiMoec53bbh scPA== X-Received: by 10.236.71.33 with SMTP id q21mr51739010yhd.60.1357235721848; Thu, 03 Jan 2013 09:55:21 -0800 (PST) Received: from rob-laptop.calxeda.com ([173.226.190.120]) by mx.google.com with ESMTPS id q4sm44227297anp.18.2013.01.03.09.55.20 (version=SSLv3 cipher=OTHER); Thu, 03 Jan 2013 09:55:21 -0800 (PST) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 17/19] ARM: spear: use common irqchip_init function Date: Thu, 3 Jan 2013 11:54:26 -0600 Message-Id: <1357235668-9450-18-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1357235668-9450-1-git-send-email-robherring2@gmail.com> References: <1357235668-9450-1-git-send-email-robherring2@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130103_125523_500271_F85CB3CB X-CRM114-Status: GOOD ( 15.19 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.169 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: thomas.petazzoni@free-electrons.com, Rajeev Kumar , Russell King , Arnd Bergmann , Rob Herring , Viresh Kumar , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Rob Herring Convert spear DT irq initialization over to use common irqchip_init function. Signed-off-by: Rob Herring Cc: Viresh Kumar Cc: Shiraz Hashim Cc: Rajeev Kumar --- arch/arm/mach-spear3xx/include/mach/generic.h | 1 - arch/arm/mach-spear3xx/spear300.c | 3 ++- arch/arm/mach-spear3xx/spear310.c | 3 ++- arch/arm/mach-spear3xx/spear320.c | 3 ++- arch/arm/mach-spear3xx/spear3xx.c | 16 ---------------- arch/arm/mach-spear6xx/spear6xx.c | 15 ++------------- drivers/irqchip/spear-shirq.c | 3 +++ 7 files changed, 11 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h index ce19113..c26b7a4 100644 --- a/arch/arm/mach-spear3xx/include/mach/generic.h +++ b/arch/arm/mach-spear3xx/include/mach/generic.h @@ -30,7 +30,6 @@ extern struct pl08x_platform_data pl080_plat_data; void __init spear_setup_of_timer(void); void __init spear3xx_clk_init(void); void __init spear3xx_map_io(void); -void __init spear3xx_dt_init_irq(void); void spear_restart(char, const char *); diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c index 7a11d85..499479b 100644 --- a/arch/arm/mach-spear3xx/spear300.c +++ b/arch/arm/mach-spear3xx/spear300.c @@ -14,6 +14,7 @@ #define pr_fmt(fmt) "SPEAr300: " fmt #include +#include #include #include #include @@ -211,7 +212,7 @@ static void __init spear300_map_io(void) DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") .map_io = spear300_map_io, - .init_irq = spear3xx_dt_init_irq, + .init_irq = irqchip_init, .timer = &spear3xx_timer, .init_machine = spear300_dt_init, .restart = spear_restart, diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c index 9719f83..367d9be 100644 --- a/arch/arm/mach-spear3xx/spear310.c +++ b/arch/arm/mach-spear3xx/spear310.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -253,7 +254,7 @@ static void __init spear310_map_io(void) DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") .map_io = spear310_map_io, - .init_irq = spear3xx_dt_init_irq, + .init_irq = irqchip_init, .timer = &spear3xx_timer, .init_machine = spear310_dt_init, .restart = spear_restart, diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c index 3a22d842..34c212e 100644 --- a/arch/arm/mach-spear3xx/spear320.c +++ b/arch/arm/mach-spear3xx/spear320.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -267,7 +268,7 @@ static void __init spear320_map_io(void) DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") .map_io = spear320_map_io, - .init_irq = spear3xx_dt_init_irq, + .init_irq = irqchip_init, .timer = &spear3xx_timer, .init_machine = spear320_dt_init, .restart = spear_restart, diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c index 38fe95d..c6003ef 100644 --- a/arch/arm/mach-spear3xx/spear3xx.c +++ b/arch/arm/mach-spear3xx/spear3xx.c @@ -15,11 +15,8 @@ #include #include -#include -#include #include #include -#include #include #include #include @@ -119,16 +116,3 @@ static void __init spear3xx_timer_init(void) struct sys_timer spear3xx_timer = { .init = spear3xx_timer_init, }; - -static const struct of_device_id vic_of_match[] __initconst = { - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, - { .compatible = "st,spear300-shirq", .data = spear300_shirq_of_init, }, - { .compatible = "st,spear310-shirq", .data = spear310_shirq_of_init, }, - { .compatible = "st,spear320-shirq", .data = spear320_shirq_of_init, }, - { /* Sentinel */ } -}; - -void __init spear3xx_dt_init_irq(void) -{ - of_irq_init(vic_of_match); -} diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c index 9d81068..3f6fac0 100644 --- a/arch/arm/mach-spear6xx/spear6xx.c +++ b/arch/arm/mach-spear6xx/spear6xx.c @@ -16,12 +16,11 @@ #include #include #include +#include #include #include -#include #include #include -#include #include #include #include @@ -425,19 +424,9 @@ static const char *spear600_dt_board_compat[] = { NULL }; -static const struct of_device_id vic_of_match[] __initconst = { - { .compatible = "arm,pl190-vic", .data = vic_of_init, }, - { /* Sentinel */ } -}; - -static void __init spear6xx_dt_init_irq(void) -{ - of_irq_init(vic_of_match); -} - DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") .map_io = spear6xx_map_io, - .init_irq = spear6xx_dt_init_irq, + .init_irq = irqchip_init, .timer = &spear6xx_timer, .init_machine = spear600_dt_init, .restart = spear_restart, diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c index 80e1d2f..9011b2e 100644 --- a/drivers/irqchip/spear-shirq.c +++ b/drivers/irqchip/spear-shirq.c @@ -300,6 +300,7 @@ int __init spear300_shirq_of_init(struct device_node *np, return shirq_init(spear300_shirq_blocks, ARRAY_SIZE(spear300_shirq_blocks), np); } +IRQCHIP_DECLARE(spear300_shirq, "st,spear300-shirq", spear300_shirq_of_init); int __init spear310_shirq_of_init(struct device_node *np, struct device_node *parent) @@ -307,6 +308,7 @@ int __init spear310_shirq_of_init(struct device_node *np, return shirq_init(spear310_shirq_blocks, ARRAY_SIZE(spear310_shirq_blocks), np); } +IRQCHIP_DECLARE(spear310_shirq, "st,spear310-shirq", spear310_shirq_of_init); int __init spear320_shirq_of_init(struct device_node *np, struct device_node *parent) @@ -314,3 +316,4 @@ int __init spear320_shirq_of_init(struct device_node *np, return shirq_init(spear320_shirq_blocks, ARRAY_SIZE(spear320_shirq_blocks), np); } +IRQCHIP_DECLARE(spear320_shirq, "st,spear320-shirq", spear320_shirq_of_init);