From patchwork Fri Jul 26 10:05:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2833961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E9151C0319 for ; Fri, 26 Jul 2013 10:11:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B951820149 for ; Fri, 26 Jul 2013 10:11:05 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB97E20148 for ; Fri, 26 Jul 2013 10:11:00 +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 1V2eyo-0000gb-6B; Fri, 26 Jul 2013 10:10:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2eyc-0003rJ-UU; Fri, 26 Jul 2013 10:10:22 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2eyZ-0003ps-Bq for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2013 10:10:20 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp13so1840621pab.7 for ; Fri, 26 Jul 2013 03:09:58 -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=Ivsfxz+6elI0qpbqJ9U+TPXP1trlCxxoRO/Z6rWBO4OZ39rL3+4B2u58Rx5gCX7wYm 9tKGr+h6cVXWyNAZD3iI61mKuXexOCZtqCFpUcEfgK1/d4h/72ngGJjdYO18DUxzX1PV PsOPROHhDl9nalHjcoty4LP8FEdBuCcArKNaGhqYK9CAOG2ZYmdS4ehOEP2dCW+CwiOz ovOV6pnk2i2JYWzCKs7s7aS2x0siBAZb7d9rSwNuPnIpbFM6KJU3onEN2KTkvHfmhvI2 QTOFsxpLcNoti7o09RE5Cpx2wk2G3WObFO92nyChmuY8rwr+Zw3/TdBYvWbYlyczWfgN vcwA== X-Received: by 10.68.176.132 with SMTP id ci4mr53012297pbc.7.1374833397992; Fri, 26 Jul 2013 03:09:57 -0700 (PDT) Received: from localhost.localdomain ([67.229.68.101]) by mx.google.com with ESMTPSA id kc8sm59263070pbc.18.2013.07.26.03.09.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 03:09:57 -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, olof@lixom.net Subject: [PATCH v6 04/11] ARM: mmp: avoid to include head file in mach-mmp Date: Fri, 26 Jul 2013 18:05:26 +0800 Message-Id: <1374833133-21119-5-git-send-email-haojian.zhuang@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374833133-21119-1-git-send-email-haojian.zhuang@gmail.com> References: <1374833133-21119-1-git-send-email-haojian.zhuang@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130726_061019_551406_17E6E5E1 X-CRM114-Status: GOOD ( 16.88 ) X-Spam-Score: -2.0 (--) 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 X-Spam-Status: No, score=-5.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 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 */