aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r--arch/arm/mach-msm/board-msm8x60.c58
1 files changed, 51 insertions, 7 deletions
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 1163b6fd05d2..10fa8f6e32c9 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -1,4 +1,4 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved. 1/* Copyright (c) 2010, 2011, Code Aurora Forum. All rights reserved.
2 * 2 *
3 * This program is free software; you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License version 2 and
@@ -8,18 +8,16 @@
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details. 10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 *
17 */ 11 */
18 12
19#include <linux/kernel.h> 13#include <linux/kernel.h>
20#include <linux/platform_device.h> 14#include <linux/platform_device.h>
21#include <linux/io.h> 15#include <linux/io.h>
22#include <linux/irq.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_platform.h>
23 21
24#include <asm/mach-types.h> 22#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
@@ -64,6 +62,41 @@ static void __init msm8x60_init(void)
64{ 62{
65} 63}
66 64
65#ifdef CONFIG_OF
66static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
67 {}
68};
69
70static struct of_device_id msm_dt_gic_match[] __initdata = {
71 { .compatible = "qcom,msm-8660-qgic", },
72 {}
73};
74
75static void __init msm8x60_dt_init(void)
76{
77 struct device_node *node;
78
79 node = of_find_matching_node_by_address(NULL, msm_dt_gic_match,
80 MSM8X60_QGIC_DIST_PHYS);
81 if (node)
82 irq_domain_add_simple(node, GIC_SPI_START);
83
84 if (of_machine_is_compatible("qcom,msm8660-surf")) {
85 printk(KERN_INFO "Init surf UART registers\n");
86 msm8x60_init_uart12dm();
87 }
88
89 of_platform_populate(NULL, of_default_bus_match_table,
90 msm_auxdata_lookup, NULL);
91}
92
93static const char *msm8x60_fluid_match[] __initdata = {
94 "qcom,msm8660-fluid",
95 "qcom,msm8660-surf",
96 NULL
97};
98#endif /* CONFIG_OF */
99
67MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") 100MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
68 .map_io = msm8x60_map_io, 101 .map_io = msm8x60_map_io,
69 .init_irq = msm8x60_init_irq, 102 .init_irq = msm8x60_init_irq,
@@ -91,3 +124,14 @@ MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
91 .init_machine = msm8x60_init, 124 .init_machine = msm8x60_init,
92 .timer = &msm_timer, 125 .timer = &msm_timer,
93MACHINE_END 126MACHINE_END
127
128#ifdef CONFIG_OF
129/* TODO: General device tree support for all MSM. */
130DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
131 .map_io = msm8x60_map_io,
132 .init_irq = msm8x60_init_irq,
133 .init_machine = msm8x60_dt_init,
134 .timer = &msm_timer,
135 .dt_compat = msm8x60_fluid_match,
136MACHINE_END
137#endif /* CONFIG_OF */