From patchwork Tue May 28 02:21:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 17240 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7B396238E8 for ; Tue, 28 May 2013 02:23:57 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id m17sf9418177vca.8 for ; Mon, 27 May 2013 19:22:52 -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=j0wpQrjZ46/HuXk056l7CY59tVdptosZ5NVP4nkARNc=; b=AexwDZBTKy0jb2AIUtb4gP1MCaJqY4mSEmhZBru4gUnmqpZRlFFNfaaMBeM5X2ozqg 3GiZzWKWoJnZhrXCrTAZd6BAmUHj3kI1CIxA9xU1LGa87ppQaKqed3EcV+bu+fiYhbZw HIn/DulJB3anMFpb+vN4Fgc26gjMd2pAzDTryGrwZ6QEPDQgJS1ummev6+9nlkFcHtiS 6NW5VMLjS+FL9SerJwwDYho4L4Y6v5Emt5laAr9Spf4nkOzJhTmH1S0fkw7x2uzwENOd N3t4OA2+8BM6m65wQrhU5fxuxxf/O7m7ddJ10i9asAx6MA0oiUyNy6iPkcIIsWN2YPsE m+FQ== 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=j0wpQrjZ46/HuXk056l7CY59tVdptosZ5NVP4nkARNc=; b=TJC8a2MHv4EIbag7pcRz4fYzM0qFRUn+0RcRudYgQBwNufzimnxyIBen4stIPSA41s eQwjLxRuZil9/UJ7UqaS7vHG1m7ukML84RAWApW6OOLc+U1KA4hqWZYKBon4EuH5O51h TT91Jy5MmA9jlBWbgOvpqyI1iqOBRsIOBvRY+uehHF1kp/duWMLeCCduuyWRLU6MTgbc kD8cCyE901JfexNBs40zagz2bGSq09Q88ZC0W4MWWXTexmfiu5WOSUtTyf3PPTOKBo+3 dzfM3ooxO/8P7syAEc48FeC374qw4WGGujRUwxCyzvUxIPnWDfIw4mEzh7dEUJiWjCXH J+ww== X-Received: by 10.224.53.198 with SMTP id n6mr13294643qag.2.1369707771984; Mon, 27 May 2013 19:22:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.50 with SMTP id f18ls3043299qey.20.gmail; Mon, 27 May 2013 19:22:51 -0700 (PDT) X-Received: by 10.220.173.6 with SMTP id n6mr16519227vcz.52.1369707771799; Mon, 27 May 2013 19:22:51 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id tn5si17922983vdc.78.2013.05.27.19.22.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 19:22:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id gf12so5091072vcb.41 for ; Mon, 27 May 2013 19:22:50 -0700 (PDT) X-Received: by 10.220.192.3 with SMTP id do3mr16666547vcb.16.1369707770723; Mon, 27 May 2013 19:22:50 -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.220.229.199 with SMTP id jj7csp19377vcb; Mon, 27 May 2013 19:22:50 -0700 (PDT) X-Received: by 10.66.232.40 with SMTP id tl8mr32290286pac.121.1369707769920; Mon, 27 May 2013 19:22:49 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id sk3si22315314pab.29.2013.05.27.19.22.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 19:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of haojian.zhuang@gmail.com designates 209.85.220.47 as permitted sender) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kl13so1188631pab.20 for ; Mon, 27 May 2013 19:22:49 -0700 (PDT) X-Received: by 10.68.244.5 with SMTP id xc5mr32107230pbc.66.1369707769496; Mon, 27 May 2013 19:22:49 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.40]) by mx.google.com with ESMTPSA id zs12sm32959785pab.0.2013.05.27.19.22.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 19:22:48 -0700 (PDT) From: Haojian Zhuang To: linux-arm-kernel@lists.infradead.org, chao.xie@marvell.com, zhangwm@marvell.com, tglx@linutronix.de, arnd@arndb.de Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v2 5/5] ARM: mmp: avoid to include head file in mach-mmp Date: Tue, 28 May 2013 10:21:47 +0800 Message-Id: <1369707707-30295-6-git-send-email-haojian.zhuang@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1369707707-30295-1-git-send-email-haojian.zhuang@gmail.com> References: <1369707707-30295-1-git-send-email-haojian.zhuang@gmail.com> X-Gm-Message-State: ALoCoQlLCWmY133I+FOwgfhdtlj6TKxavWal/FPARdD9IMZ7zsIIPl9+5SuhcOye2BCq/Jsp3bHH X-Original-Sender: haojian.zhuang@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 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 | 3 +++ arch/arm/mach-mmp/pxa910.c | 3 +++ drivers/irqchip/irq-mmp.c | 15 +-------------- include/linux/irqchip/mmp.h | 2 ++ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index 08245c7..2e5ce13 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" @@ -94,6 +96,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 4ce3e16..78b6e22 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" @@ -80,6 +82,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 90fe265..b2ec91a 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -25,13 +25,6 @@ #include #include -#ifdef CONFIG_CPU_MMP2 -#include -#endif -#ifdef CONFIG_CPU_PXA910 -#include -#endif - #include "irqchip.h" #define MAX_ICU_NR 16 @@ -131,7 +124,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, @@ -250,9 +243,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) */ @@ -357,9 +347,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 index fb492a5..98558b7 100644 --- a/include/linux/irqchip/mmp.h +++ b/include/linux/irqchip/mmp.h @@ -236,4 +236,6 @@ #define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO) #define MMP_NR_IRQS IRQ_BOARD_START +extern struct irq_chip icu_irq_chip; + #endif /* __ASM_MACH_IRQS_H */