linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 04/11] ARM: mmp: avoid to include head file in mach-mmp
Date: Mon,  3 Jun 2013 17:30:38 +0800	[thread overview]
Message-ID: <1370251845-31373-5-git-send-email-haojian.zhuang@gmail.com> (raw)
In-Reply-To: <1370251845-31373-1-git-send-email-haojian.zhuang@gmail.com>

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 <haojian.zhuang@gmail.com>
---
 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 <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 
 #include <asm/hardware/cache-tauros2.h>
@@ -26,6 +27,7 @@
 #include <mach/mfp.h>
 #include <mach/devices.h>
 #include <mach/mmp2.h>
+#include <mach/pm-mmp2.h>
 
 #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 <linux/init.h>
 #include <linux/list.h>
 #include <linux/io.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 
 #include <asm/hardware/cache-tauros2.h>
@@ -23,6 +24,7 @@
 #include <mach/dma.h>
 #include <mach/mfp.h>
 #include <mach/devices.h>
+#include <mach/pm-pxa910.h>
 #include <mach/pxa910.h>
 
 #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 <mach/irqs.h>
 
-#ifdef CONFIG_CPU_MMP2
-#include <mach/pm-mmp2.h>
-#endif
-#ifdef CONFIG_CPU_PXA910
-#include <mach/pm-pxa910.h>
-#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
-- 
1.8.1.2

  parent reply	other threads:[~2013-06-03  9:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  9:30 [PATCH v3 00/11] update irqchip, clocksource, clk in mmp Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 01/11] irqchip: move mmp irq driver Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 02/11] irqchip: mmp: support irqchip Haojian Zhuang
2013-06-03  9:42   ` Russell King - ARM Linux
2013-06-03 10:06     ` Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 03/11] irqchip: mmp: support MULTI_IRQ_HANDLER Haojian Zhuang
2013-06-03  9:30 ` Haojian Zhuang [this message]
2013-06-03 22:28   ` [PATCH v3 04/11] ARM: mmp: avoid to include head file in mach-mmp Arnd Bergmann
2013-06-03  9:30 ` [PATCH v3 05/11] irqchip: mmp: avoid to include irqs head file Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 06/11] clocksource: mmp: move mmp timer driver Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 07/11] ARM: mmp: move timer registers into driver Haojian Zhuang
2013-06-03 22:31   ` Arnd Bergmann
2013-06-03  9:30 ` [PATCH v3 08/11] ARM: pxa: init dma debugfs in late level Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 09/11] clk: mmp: parse clock from dts Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 10/11] ARM: mmp: avoid to use cpu_is_xxx in timer Haojian Zhuang
2013-06-03 22:34   ` Arnd Bergmann
2013-06-04  1:24     ` Haojian Zhuang
2013-06-03  9:30 ` [PATCH v3 11/11] ARCH: mmp: support clocksource " Haojian Zhuang
2013-06-03 17:07   ` John Stultz
2013-06-04  1:25     ` Haojian Zhuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370251845-31373-5-git-send-email-haojian.zhuang@gmail.com \
    --to=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).