aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/board-msm8x60.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/board-msm8x60.c')
-rw-r--r--arch/arm/mach-msm/board-msm8x60.c161
1 files changed, 0 insertions, 161 deletions
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
deleted file mode 100644
index 06003b4ccb10..000000000000
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ /dev/null
@@ -1,161 +0,0 @@
1/* Copyright (c) 2010, 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/kernel.h>
14#include <linux/platform_device.h>
15#include <linux/io.h>
16#include <linux/irq.h>
17#include <linux/irqdomain.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <linux/of_irq.h>
21#include <linux/of_platform.h>
22#include <linux/memblock.h>
23
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <asm/hardware/gic.h>
27#include <asm/setup.h>
28
29#include <mach/board.h>
30#include <mach/msm_iomap.h>
31
32static void __init msm8x60_fixup(struct tag *tag, char **cmdline,
33 struct meminfo *mi)
34{
35 for (; tag->hdr.size; tag = tag_next(tag))
36 if (tag->hdr.tag == ATAG_MEM &&
37 tag->u.mem.start == 0x40200000) {
38 tag->u.mem.start = 0x40000000;
39 tag->u.mem.size += SZ_2M;
40 }
41}
42
43static void __init msm8x60_reserve(void)
44{
45 memblock_remove(0x40000000, SZ_2M);
46}
47
48static void __init msm8x60_map_io(void)
49{
50 msm_map_msm8x60_io();
51}
52
53#ifdef CONFIG_OF
54static struct of_device_id msm_dt_gic_match[] __initdata = {
55 { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
56 {}
57};
58#endif
59
60static void __init msm8x60_init_irq(void)
61{
62 if (!of_have_populated_dt())
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
69
70 /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */
71 writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
72
73 /* RUMI does not adhere to GIC spec by enabling STIs by default.
74 * Enable/clear is supposed to be RO for STIs, but is RW on RUMI.
75 */
76 if (!machine_is_msm8x60_sim())
77 writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET);
78}
79
80static void __init msm8x60_init(void)
81{
82}
83
84static void __init msm8x60_init_late(void)
85{
86 smd_debugfs_init();
87}
88
89#ifdef CONFIG_OF
90static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
91 {}
92};
93
94static void __init msm8x60_dt_init(void)
95{
96 of_platform_populate(NULL, of_default_bus_match_table,
97 msm_auxdata_lookup, NULL);
98}
99
100static const char *msm8x60_fluid_match[] __initdata = {
101 "qcom,msm8660-fluid",
102 "qcom,msm8660-surf",
103 NULL
104};
105#endif /* CONFIG_OF */
106
107MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
108 .fixup = msm8x60_fixup,
109 .reserve = msm8x60_reserve,
110 .map_io = msm8x60_map_io,
111 .init_irq = msm8x60_init_irq,
112 .handle_irq = gic_handle_irq,
113 .init_machine = msm8x60_init,
114 .init_late = msm8x60_init_late,
115 .timer = &msm_timer,
116MACHINE_END
117
118MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
119 .fixup = msm8x60_fixup,
120 .reserve = msm8x60_reserve,
121 .map_io = msm8x60_map_io,
122 .init_irq = msm8x60_init_irq,
123 .handle_irq = gic_handle_irq,
124 .init_machine = msm8x60_init,
125 .init_late = msm8x60_init_late,
126 .timer = &msm_timer,
127MACHINE_END
128
129MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
130 .fixup = msm8x60_fixup,
131 .reserve = msm8x60_reserve,
132 .map_io = msm8x60_map_io,
133 .init_irq = msm8x60_init_irq,
134 .handle_irq = gic_handle_irq,
135 .init_machine = msm8x60_init,
136 .init_late = msm8x60_init_late,
137 .timer = &msm_timer,
138MACHINE_END
139
140MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
141 .fixup = msm8x60_fixup,
142 .reserve = msm8x60_reserve,
143 .map_io = msm8x60_map_io,
144 .init_irq = msm8x60_init_irq,
145 .handle_irq = gic_handle_irq,
146 .init_machine = msm8x60_init,
147 .init_late = msm8x60_init_late,
148 .timer = &msm_timer,
149MACHINE_END
150
151#ifdef CONFIG_OF
152/* TODO: General device tree support for all MSM. */
153DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
154 .map_io = msm8x60_map_io,
155 .init_irq = msm8x60_init_irq,
156 .init_machine = msm8x60_dt_init,
157 .init_late = msm8x60_init_late,
158 .timer = &msm_timer,
159 .dt_compat = msm8x60_fluid_match,
160MACHINE_END
161#endif /* CONFIG_OF */