From patchwork Tue Jun 4 04:12:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2656541 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 265E33FC8C for ; Tue, 4 Jun 2013 04:18: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 1UjifV-0004Zv-S4; Tue, 04 Jun 2013 04:16:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ujif5-0000rv-GR; Tue, 04 Jun 2013 04:15:55 +0000 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ujier-0000nr-7q for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2013 04:15:43 +0000 Received: by mail-ie0-f173.google.com with SMTP id k13so12879493iea.18 for ; Mon, 03 Jun 2013 21:15:24 -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=uTabbogoGJ8D3phCmelyqDiZrlrIVjdQ4UC7C4BRvF4=; b=clW5vvU/Qphw7N7XKIzq17fO4DvX2J7TMk0EJ8plIeRgxOAtBBDmv5KeWyBHAA5dCN 8WeYAFRyKNz/QGhpV7bB4kZKQnuCcmrxw3IlFnsTiMyN/mOolc8I1KqhWOeaTYlomyjx alZaiMWXT678L4vm+SDaA6pftQnpp5yxeEB2Dv6s04KtKKphfn4aKDNa5/2rkkf3Ff8t KYmUrE+rwMxuVMiKN+UOlJWkTFszLY6rLu4kh0LtGU96bkMA378dMV8h2L4BdMzLxfpr JUZovxPfTF65aWkVAFgf7UdC9FNA7ZmWPPO1Gs6HZAfX0rs7229w1fwJ6npIREkPHAUI gDqA== X-Received: by 10.50.22.37 with SMTP id a5mr610315igf.78.1370319324708; Mon, 03 Jun 2013 21:15:24 -0700 (PDT) Received: from localhost.localdomain ([67.229.68.100]) by mx.google.com with ESMTPSA id k10sm22887440ige.0.2013.06.03.21.15.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 21:15:23 -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, linux@arm.linux.org.uk Subject: [PATCH v4 04/10] ARM: mmp: avoid to include head file in mach-mmp Date: Tue, 4 Jun 2013 12:12:46 +0800 Message-Id: <1370319172-31788-5-git-send-email-haojian.zhuang@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1370319172-31788-1-git-send-email-haojian.zhuang@gmail.com> References: <1370319172-31788-1-git-send-email-haojian.zhuang@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130604_001541_464599_B048D754 X-CRM114-Status: GOOD ( 17.51 ) 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 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 +-------------- include/linux/irqchip/mmp.h | 6 ++++++ 4 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 include/linux/irqchip/mmp.h diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index c7592f1..09fbe7d 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include @@ -26,6 +28,7 @@ #include #include #include +#include #include "common.h" @@ -94,6 +97,7 @@ void mmp2_clear_pmic_int(void) 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..96e125b 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include @@ -23,6 +25,7 @@ #include #include #include +#include #include #include "common.h" @@ -80,6 +83,7 @@ static struct mfp_addr_map pxa910_mfp_addr_map[] __initdata = 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 diff --git a/include/linux/irqchip/mmp.h b/include/linux/irqchip/mmp.h new file mode 100644 index 0000000..c78a892 --- /dev/null +++ b/include/linux/irqchip/mmp.h @@ -0,0 +1,6 @@ +#ifndef __IRQCHIP_MMP_H +#define __IRQCHIP_MMP_H + +extern struct irq_chip icu_irq_chip; + +#endif /* __IRQCHIP_MMP_H */