Commit 0f102b6c authored by Haojian Zhuang's avatar Haojian Zhuang

ARM: mmp: avoid to include head file in mach-mmp

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: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
parent 0f374561
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqchip/mmp.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/hardware/cache-tauros2.h> #include <asm/hardware/cache-tauros2.h>
...@@ -26,6 +28,7 @@ ...@@ -26,6 +28,7 @@
#include <mach/mfp.h> #include <mach/mfp.h>
#include <mach/devices.h> #include <mach/devices.h>
#include <mach/mmp2.h> #include <mach/mmp2.h>
#include <mach/pm-mmp2.h>
#include "common.h" #include "common.h"
...@@ -94,6 +97,9 @@ void mmp2_clear_pmic_int(void) ...@@ -94,6 +97,9 @@ void mmp2_clear_pmic_int(void)
void __init mmp2_init_irq(void) void __init mmp2_init_irq(void)
{ {
mmp2_init_icu(); mmp2_init_icu();
#ifdef CONFIG_PM
icu_irq_chip.irq_set_wake = mmp2_set_wake;
#endif
} }
static int __init mmp2_init(void) static int __init mmp2_init(void)
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqchip/mmp.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/hardware/cache-tauros2.h> #include <asm/hardware/cache-tauros2.h>
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
#include <mach/dma.h> #include <mach/dma.h>
#include <mach/mfp.h> #include <mach/mfp.h>
#include <mach/devices.h> #include <mach/devices.h>
#include <mach/pm-pxa910.h>
#include <mach/pxa910.h> #include <mach/pxa910.h>
#include "common.h" #include "common.h"
...@@ -80,6 +83,9 @@ static struct mfp_addr_map pxa910_mfp_addr_map[] __initdata = ...@@ -80,6 +83,9 @@ static struct mfp_addr_map pxa910_mfp_addr_map[] __initdata =
void __init pxa910_init_irq(void) void __init pxa910_init_irq(void)
{ {
icu_init_irq(); icu_init_irq();
#ifdef CONFIG_PM
icu_irq_chip.irq_set_wake = pxa910_set_wake;
#endif
} }
static int __init pxa910_init(void) static int __init pxa910_init(void)
......
...@@ -26,13 +26,6 @@ ...@@ -26,13 +26,6 @@
#include <mach/irqs.h> #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" #include "irqchip.h"
#define MAX_ICU_NR 16 #define MAX_ICU_NR 16
...@@ -132,7 +125,7 @@ static void icu_unmask_irq(struct irq_data *d) ...@@ -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", .name = "icu_irq",
.irq_mask = icu_mask_irq, .irq_mask = icu_mask_irq,
.irq_mask_ack = icu_mask_ack_irq, .irq_mask_ack = icu_mask_ack_irq,
...@@ -251,9 +244,6 @@ void __init icu_init_irq(void) ...@@ -251,9 +244,6 @@ void __init icu_init_irq(void)
} }
irq_set_default_host(icu_data[0].domain); irq_set_default_host(icu_data[0].domain);
set_handle_irq(mmp_handle_irq); set_handle_irq(mmp_handle_irq);
#ifdef CONFIG_CPU_PXA910
icu_irq_chip.irq_set_wake = pxa910_set_wake;
#endif
} }
/* MMP2 (ARMv7) */ /* MMP2 (ARMv7) */
...@@ -358,9 +348,6 @@ void __init mmp2_init_icu(void) ...@@ -358,9 +348,6 @@ void __init mmp2_init_icu(void)
} }
irq_set_default_host(icu_data[0].domain); irq_set_default_host(icu_data[0].domain);
set_handle_irq(mmp2_handle_irq); set_handle_irq(mmp2_handle_irq);
#ifdef CONFIG_CPU_MMP2
icu_irq_chip.irq_set_wake = mmp2_set_wake;
#endif
} }
#ifdef CONFIG_OF #ifdef CONFIG_OF
......
#ifndef __IRQCHIP_MMP_H
#define __IRQCHIP_MMP_H
extern struct irq_chip icu_irq_chip;
#endif /* __IRQCHIP_MMP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment