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: 17434 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C907223916 for ; Mon, 3 Jun 2013 09:32:09 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id b4sf5467055qen.7 for ; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=aXyqVr+bxtv8FSocdOWBG3BzjWm6n+iPDl4lLl7Krl4=; b=NZABBNHVmmsP08U96PKA2tHYTCNx6fQg9F25Uj747yzKZnLS1L4JUsBz79x4nIRY0l STPirYA9VR6pTbQhVuKhqK/QzvxYsafOBvXpAUf37x1hr16KjwPFvrJpgkEW/6M5ilZh egBDotp7AG8pbvHtiKafHbeXg35AoTFhseSgXzoUJigGclibu6klBttRbjETaxn92uVA LjHCm7THfYLIadaJB3KHD5/NwOwqLJ/aqyed1gAfGSmSYBJlT1BSQHKCjb+Ho2+KE3h2 fvtAQSovb5/mzemsNz/aWY+aDBUn/rSnfS1BKDPxRPGrVwYJ6tpHyolcK/yDrPMnHGJC CVKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=aXyqVr+bxtv8FSocdOWBG3BzjWm6n+iPDl4lLl7Krl4=; b=dahKJzffof8MzrhPY7D4wwYAdiVpjyUI727tamcyQ5xvYgfW7Y0qI6/IRner5lhY2a KxJnuOGYpFCPsNxMD2k8A1TuSt0PkyP6GOQu+C7cpcTRRann3HmkCUoagq96US5Uqn+t aCkrFxLR2vYDa5vvOuqzfgFdxZUW/mK0qlIUGGPlThTt8et1Y2Hqq7o5I4/K4JclRA+o HuYDmnk7Pn6SqZ03eniySQ3ZwA/ChK9Kbn5mFqRJlFMncY8pPbPKs4Bhi747XPx91SrQ cRmiipSuDoQ7DPCNzDIcVh71UoAAf7BFuEX4ucDy67zW6bYhyxC0xJYw802MqM05OQvO rFXQ== X-Received: by 10.224.3.131 with SMTP id 3mr13598212qan.5.1370251929662; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.98.2 with SMTP id ee2ls2095906qeb.11.gmail; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) X-Received: by 10.52.171.108 with SMTP id at12mr14045171vdc.67.1370251929468; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) Received: from mail-vb0-x235.google.com (mail-vb0-x235.google.com [2607:f8b0:400c:c02::235]) by mx.google.com with ESMTPS id p8si34964655vdv.122.2013.06.03.02.32.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 02:32:09 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::235; Received: by mail-vb0-f53.google.com with SMTP id p12so160284vbe.12 for ; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) X-Received: by 10.52.155.67 with SMTP id vu3mr14049158vdb.94.1370251929342; Mon, 03 Jun 2013 02:32:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp71059vcb; Mon, 3 Jun 2013 02:32:08 -0700 (PDT) X-Received: by 10.66.231.7 with SMTP id tc7mr23388262pac.143.1370251928434; Mon, 03 Jun 2013 02:32:08 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id lb5si39407779pbc.150.2013.06.03.02.32.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 02:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of haojian.zhuang@gmail.com designates 209.85.192.178 as permitted sender) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w16so609214pde.23 for ; Mon, 03 Jun 2013 02:32:07 -0700 (PDT) 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 Cc: patches@linaro.org, Haojian Zhuang 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-Gm-Message-State: ALoCoQlWsbAGxkdRd+3VymDizOYwdSeO39uAd0q0SwpQlwxO6DoZ37qBxgFOrggSFaYCwOEgDWV4 X-Original-Sender: haojian.zhuang@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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