diff options
Diffstat (limited to 'arch/arm/mach-msm/board-msm8x60.c')
-rw-r--r-- | arch/arm/mach-msm/board-msm8x60.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 962e71169750..fb3496a52ef4 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/irqdomain.h> | 17 | #include <linux/irqdomain.h> |
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
20 | #include <linux/of_irq.h> | ||
20 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
21 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
22 | 23 | ||
@@ -49,10 +50,22 @@ static void __init msm8x60_map_io(void) | |||
49 | msm_map_msm8x60_io(); | 50 | msm_map_msm8x60_io(); |
50 | } | 51 | } |
51 | 52 | ||
53 | #ifdef CONFIG_OF | ||
54 | static struct of_device_id msm_dt_gic_match[] __initdata = { | ||
55 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, | ||
56 | {} | ||
57 | }; | ||
58 | #endif | ||
59 | |||
52 | static void __init msm8x60_init_irq(void) | 60 | static void __init msm8x60_init_irq(void) |
53 | { | 61 | { |
54 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, | 62 | if (!of_have_populated_dt()) |
55 | (void *)MSM_QGIC_CPU_BASE); | 63 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
64 | (void *)MSM_QGIC_CPU_BASE); | ||
65 | #ifdef CONFIG_OF | ||
66 | else | ||
67 | of_irq_init(msm_dt_gic_match); | ||
68 | #endif | ||
56 | 69 | ||
57 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ | 70 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ |
58 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); | 71 | writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); |
@@ -73,16 +86,8 @@ static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { | |||
73 | {} | 86 | {} |
74 | }; | 87 | }; |
75 | 88 | ||
76 | static struct of_device_id msm_dt_gic_match[] __initdata = { | ||
77 | { .compatible = "qcom,msm-8660-qgic", }, | ||
78 | {} | ||
79 | }; | ||
80 | |||
81 | static void __init msm8x60_dt_init(void) | 89 | static void __init msm8x60_dt_init(void) |
82 | { | 90 | { |
83 | irq_domain_generate_simple(msm_dt_gic_match, MSM8X60_QGIC_DIST_PHYS, | ||
84 | GIC_SPI_START); | ||
85 | |||
86 | if (of_machine_is_compatible("qcom,msm8660-surf")) { | 91 | if (of_machine_is_compatible("qcom,msm8660-surf")) { |
87 | printk(KERN_INFO "Init surf UART registers\n"); | 92 | printk(KERN_INFO "Init surf UART registers\n"); |
88 | msm8x60_init_uart12dm(); | 93 | msm8x60_init_uart12dm(); |