Stephen Boyd | 5b67bfb | 2012-09-05 12:28:55 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 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. |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 11 | */ |
| 12 | |
Stephen Boyd | 5b67bfb | 2012-09-05 12:28:55 -0700 | [diff] [blame] | 13 | #include <linux/init.h> |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 14 | #include <linux/of.h> |
David Brown | 2b7b9a7 | 2012-04-23 15:34:20 -0700 | [diff] [blame] | 15 | #include <linux/of_irq.h> |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 16 | #include <linux/of_platform.h> |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 17 | |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 18 | #include <asm/mach/arch.h> |
| 19 | #include <asm/hardware/gic.h> |
| 20 | |
| 21 | #include <mach/board.h> |
Stephen Boyd | 4312a7e | 2012-09-05 12:28:52 -0700 | [diff] [blame] | 22 | #include "common.h" |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 23 | |
Stephen Boyd | 5b67bfb | 2012-09-05 12:28:55 -0700 | [diff] [blame] | 24 | static const struct of_device_id msm_dt_gic_match[] __initconst = { |
David Brown | 2b7b9a7 | 2012-04-23 15:34:20 -0700 | [diff] [blame] | 25 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, |
| 26 | {} |
| 27 | }; |
David Brown | 2b7b9a7 | 2012-04-23 15:34:20 -0700 | [diff] [blame] | 28 | |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 29 | static void __init msm8x60_init_irq(void) |
| 30 | { |
Stephen Boyd | 5b67bfb | 2012-09-05 12:28:55 -0700 | [diff] [blame] | 31 | of_irq_init(msm_dt_gic_match); |
Steve Muckle | a55df6e | 2010-01-07 12:43:24 -0800 | [diff] [blame] | 32 | } |
| 33 | |
Shawn Guo | c633c53 | 2012-05-02 15:53:20 +0800 | [diff] [blame] | 34 | static void __init msm8x60_init_late(void) |
| 35 | { |
| 36 | smd_debugfs_init(); |
| 37 | } |
| 38 | |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 39 | static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = { |
| 40 | {} |
| 41 | }; |
| 42 | |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 43 | static void __init msm8x60_dt_init(void) |
| 44 | { |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 45 | of_platform_populate(NULL, of_default_bus_match_table, |
| 46 | msm_auxdata_lookup, NULL); |
| 47 | } |
| 48 | |
| 49 | static const char *msm8x60_fluid_match[] __initdata = { |
| 50 | "qcom,msm8660-fluid", |
| 51 | "qcom,msm8660-surf", |
| 52 | NULL |
| 53 | }; |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 54 | |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 55 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") |
Olof Johansson | 25468fe | 2012-09-22 00:06:21 -0700 | [diff] [blame] | 56 | .smp = smp_ops(msm_smp_ops), |
Stephen Boyd | 5b67bfb | 2012-09-05 12:28:55 -0700 | [diff] [blame] | 57 | .map_io = msm_map_msm8x60_io, |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 58 | .init_irq = msm8x60_init_irq, |
Stephen Boyd | 63c86c9 | 2012-08-22 16:00:13 -0700 | [diff] [blame] | 59 | .handle_irq = gic_handle_irq, |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 60 | .init_machine = msm8x60_dt_init, |
Shawn Guo | c633c53 | 2012-05-02 15:53:20 +0800 | [diff] [blame] | 61 | .init_late = msm8x60_init_late, |
Stephen Boyd | 8407116 | 2012-09-05 12:28:54 -0700 | [diff] [blame] | 62 | .timer = &msm_dt_timer, |
David Brown | 56e2d8a | 2011-08-04 02:01:02 -0700 | [diff] [blame] | 63 | .dt_compat = msm8x60_fluid_match, |
| 64 | MACHINE_END |