From patchwork Mon Jun 3 09:30:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2651341 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 4D1CC3FC23 for ; Mon, 3 Jun 2013 09:35:07 +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 1UjR8Y-0006e1-Sh; Mon, 03 Jun 2013 09:33:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UjR86-0001tO-3e; Mon, 03 Jun 2013 09:32:42 +0000 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UjR7u-0001oj-HN for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2013 09:32:31 +0000 Received: by mail-pb0-f47.google.com with SMTP id rr4so5429133pbb.20 for ; Mon, 03 Jun 2013 02:32:07 -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:x-mailer:in-reply-to:references; bh=aXyqVr+bxtv8FSocdOWBG3BzjWm6n+iPDl4lLl7Krl4=; b=cI/HgTchBrwLN2ps2I4lShFIg7uU1HO2zClVM6YEsvG2WJP4NVEgTkMn37nBzaLcI4 jV4j76wTrFpYjKtKwagkUboogHpQM0qyF7R/A5ZvxBRMYjr4ZQPDGIz7h4o8/svvWx7B haptgHMuBpPdBjEFY86ri1+HJ4KairjLhLDsbDLGFDJUfU3RQXfSwRTqS8MeaaMRLWcZ JQJSfYxyyDbW4ueUzNEF9eTAjmxaJGWDMORTQrdgQAvIvvgL8phIanfqdNmTfOFoRY2n iUKgtSFjOjAVOV+tATSAAhygVKj/8qDCaef4+HQe0XrZUVn0DOgbaXUIriefLkQewboz D4Gw== X-Received: by 10.66.150.106 with SMTP id uh10mr23846865pab.118.1370251927375; Mon, 03 Jun 2013 02:32:07 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.40]) by mx.google.com with ESMTPSA id wi6sm58333510pbc.22.2013.06.03.02.32.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 02:32:06 -0700 (PDT) From: Haojian Zhuang To: tglx@linutronix.de, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, chao.xie@marvell.com, john.stultz@linaro.org, mturquette@linaro.org, eric.y.miao@gmail.com Subject: [PATCH v3 04/11] ARM: mmp: avoid to include head file in mach-mmp Date: Mon, 3 Jun 2013 17:30:38 +0800 Message-Id: <1370251845-31373-5-git-send-email-haojian.zhuang@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1370251845-31373-1-git-send-email-haojian.zhuang@gmail.com> References: <1370251845-31373-1-git-send-email-haojian.zhuang@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130603_053230_705044_E789C8D0 X-CRM114-Status: GOOD ( 15.80 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (haojian.zhuang[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -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: Haojian Zhuang , patches@linaro.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 pxa910_set_wake() & mmp2_set_wake() are both declared in head files of arch/arm/mach-mmp/include/mach directory. If we include these head files in irq-mmp driver, it blocks the multiplatform build. So adjust the code. Signed-off-by: Haojian Zhuang --- arch/arm/mach-mmp/mmp2.c | 4 ++++ arch/arm/mach-mmp/pxa910.c | 4 ++++ drivers/irqchip/irq-mmp.c | 15 +-------------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index c7592f1..4dbf3e0 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include "common.h" @@ -91,9 +93,11 @@ void mmp2_clear_pmic_int(void) __raw_writel(data, mfpr_pmic); } +extern struct irq_chip icu_irq_chip; void __init mmp2_init_irq(void) { mmp2_init_icu(); + icu_irq_chip.irq_set_wake = mmp2_set_wake; } static int __init mmp2_init(void) diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index a586742..df7e33f 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include "common.h" @@ -77,9 +79,11 @@ static struct mfp_addr_map pxa910_mfp_addr_map[] __initdata = MFP_ADDR_END, }; +extern struct irq_chip icu_irq_chip; void __init pxa910_init_irq(void) { icu_init_irq(); + icu_irq_chip.irq_set_wake = pxa910_set_wake; } static int __init pxa910_init(void) diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index 84d51ff..1f81432 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -26,13 +26,6 @@ #include -#ifdef CONFIG_CPU_MMP2 -#include -#endif -#ifdef CONFIG_CPU_PXA910 -#include -#endif - #include "irqchip.h" #define MAX_ICU_NR 16 @@ -132,7 +125,7 @@ static void icu_unmask_irq(struct irq_data *d) } } -static struct irq_chip icu_irq_chip = { +struct irq_chip icu_irq_chip = { .name = "icu_irq", .irq_mask = icu_mask_irq, .irq_mask_ack = icu_mask_ack_irq, @@ -251,9 +244,6 @@ void __init icu_init_irq(void) } irq_set_default_host(icu_data[0].domain); set_handle_irq(mmp_handle_irq); -#ifdef CONFIG_CPU_PXA910 - icu_irq_chip.irq_set_wake = pxa910_set_wake; -#endif } /* MMP2 (ARMv7) */ @@ -358,9 +348,6 @@ void __init mmp2_init_icu(void) } irq_set_default_host(icu_data[0].domain); set_handle_irq(mmp2_handle_irq); -#ifdef CONFIG_CPU_MMP2 - icu_irq_chip.irq_set_wake = mmp2_set_wake; -#endif } #ifdef CONFIG_OF