blob: e5643f629dcd88cb6d0ff773ce0596fb638ef9e1 [file] [log] [blame]
Stephen Boyd5b67bfb2012-09-05 12:28:55 -07001/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
Steve Mucklea55df6e2010-01-07 12:43:24 -08002 *
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.
Steve Mucklea55df6e2010-01-07 12:43:24 -080011 */
12
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070013#include <linux/init.h>
David Brown56e2d8a2011-08-04 02:01:02 -070014#include <linux/of.h>
David Brown2b7b9a72012-04-23 15:34:20 -070015#include <linux/of_irq.h>
David Brown56e2d8a2011-08-04 02:01:02 -070016#include <linux/of_platform.h>
Steve Mucklea55df6e2010-01-07 12:43:24 -080017
Steve Mucklea55df6e2010-01-07 12:43:24 -080018#include <asm/mach/arch.h>
19#include <asm/hardware/gic.h>
20
21#include <mach/board.h>
Stephen Boyd4312a7e2012-09-05 12:28:52 -070022#include "common.h"
Olof Johansson25468fe2012-09-22 00:06:21 -070023#include "core.h"
Steve Mucklea55df6e2010-01-07 12:43:24 -080024
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070025static const struct of_device_id msm_dt_gic_match[] __initconst = {
David Brown2b7b9a72012-04-23 15:34:20 -070026 { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
27 {}
28};
David Brown2b7b9a72012-04-23 15:34:20 -070029
Steve Mucklea55df6e2010-01-07 12:43:24 -080030static void __init msm8x60_init_irq(void)
31{
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070032 of_irq_init(msm_dt_gic_match);
Steve Mucklea55df6e2010-01-07 12:43:24 -080033}
34
Shawn Guoc633c532012-05-02 15:53:20 +080035static void __init msm8x60_init_late(void)
36{
37 smd_debugfs_init();
38}
39
David Brown56e2d8a2011-08-04 02:01:02 -070040static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
41 {}
42};
43
David Brown56e2d8a2011-08-04 02:01:02 -070044static void __init msm8x60_dt_init(void)
45{
David Brown56e2d8a2011-08-04 02:01:02 -070046 of_platform_populate(NULL, of_default_bus_match_table,
47 msm_auxdata_lookup, NULL);
48}
49
50static const char *msm8x60_fluid_match[] __initdata = {
51 "qcom,msm8660-fluid",
52 "qcom,msm8660-surf",
53 NULL
54};
David Brown56e2d8a2011-08-04 02:01:02 -070055
David Brown56e2d8a2011-08-04 02:01:02 -070056DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
Olof Johansson25468fe2012-09-22 00:06:21 -070057 .smp = smp_ops(msm_smp_ops),
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070058 .map_io = msm_map_msm8x60_io,
David Brown56e2d8a2011-08-04 02:01:02 -070059 .init_irq = msm8x60_init_irq,
Stephen Boyd63c86c92012-08-22 16:00:13 -070060 .handle_irq = gic_handle_irq,
David Brown56e2d8a2011-08-04 02:01:02 -070061 .init_machine = msm8x60_dt_init,
Shawn Guoc633c532012-05-02 15:53:20 +080062 .init_late = msm8x60_init_late,
Stephen Boyd84071162012-09-05 12:28:54 -070063 .timer = &msm_dt_timer,
David Brown56e2d8a2011-08-04 02:01:02 -070064 .dt_compat = msm8x60_fluid_match,
65MACHINE_END