blob: b5b4de2cdf9e0a4ae9526087c04ae2c9ec01f2ff [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"
Steve Mucklea55df6e2010-01-07 12:43:24 -080023
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070024static const struct of_device_id msm_dt_gic_match[] __initconst = {
David Brown2b7b9a72012-04-23 15:34:20 -070025 { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
26 {}
27};
David Brown2b7b9a72012-04-23 15:34:20 -070028
Steve Mucklea55df6e2010-01-07 12:43:24 -080029static void __init msm8x60_init_irq(void)
30{
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070031 of_irq_init(msm_dt_gic_match);
Steve Mucklea55df6e2010-01-07 12:43:24 -080032}
33
Shawn Guoc633c532012-05-02 15:53:20 +080034static void __init msm8x60_init_late(void)
35{
36 smd_debugfs_init();
37}
38
David Brown56e2d8a2011-08-04 02:01:02 -070039static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
40 {}
41};
42
David Brown56e2d8a2011-08-04 02:01:02 -070043static void __init msm8x60_dt_init(void)
44{
David Brown56e2d8a2011-08-04 02:01:02 -070045 of_platform_populate(NULL, of_default_bus_match_table,
46 msm_auxdata_lookup, NULL);
47}
48
49static const char *msm8x60_fluid_match[] __initdata = {
50 "qcom,msm8660-fluid",
51 "qcom,msm8660-surf",
52 NULL
53};
David Brown56e2d8a2011-08-04 02:01:02 -070054
David Brown56e2d8a2011-08-04 02:01:02 -070055DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
Olof Johansson25468fe2012-09-22 00:06:21 -070056 .smp = smp_ops(msm_smp_ops),
Stephen Boyd5b67bfb2012-09-05 12:28:55 -070057 .map_io = msm_map_msm8x60_io,
David Brown56e2d8a2011-08-04 02:01:02 -070058 .init_irq = msm8x60_init_irq,
Stephen Boyd63c86c92012-08-22 16:00:13 -070059 .handle_irq = gic_handle_irq,
David Brown56e2d8a2011-08-04 02:01:02 -070060 .init_machine = msm8x60_dt_init,
Shawn Guoc633c532012-05-02 15:53:20 +080061 .init_late = msm8x60_init_late,
Stephen Boyd84071162012-09-05 12:28:54 -070062 .timer = &msm_dt_timer,
David Brown56e2d8a2011-08-04 02:01:02 -070063 .dt_compat = msm8x60_fluid_match,
64MACHINE_END