diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-generic.c')
-rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 87162e1b94a5..19f1652e94cf 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -15,13 +15,10 @@ | |||
15 | #include <linux/of_irq.h> | 15 | #include <linux/of_irq.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/irqdomain.h> | 17 | #include <linux/irqdomain.h> |
18 | #include <linux/clk.h> | ||
19 | 18 | ||
20 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
21 | 20 | ||
22 | #include "common.h" | 21 | #include "common.h" |
23 | #include "common-board-devices.h" | ||
24 | #include "dss-common.h" | ||
25 | 22 | ||
26 | #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) | 23 | #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) |
27 | #define intc_of_init NULL | 24 | #define intc_of_init NULL |
@@ -36,40 +33,9 @@ static struct of_device_id omap_dt_match_table[] __initdata = { | |||
36 | { } | 33 | { } |
37 | }; | 34 | }; |
38 | 35 | ||
39 | /* | ||
40 | * Create alias for USB host PHY clock. | ||
41 | * Remove this when clock phandle can be provided via DT | ||
42 | */ | ||
43 | static void __init legacy_init_ehci_clk(char *clkname) | ||
44 | { | ||
45 | int ret; | ||
46 | |||
47 | ret = clk_add_alias("main_clk", NULL, clkname, NULL); | ||
48 | if (ret) { | ||
49 | pr_err("%s:Failed to add main_clk alias to %s :%d\n", | ||
50 | __func__, clkname, ret); | ||
51 | } | ||
52 | } | ||
53 | |||
54 | static void __init omap_generic_init(void) | 36 | static void __init omap_generic_init(void) |
55 | { | 37 | { |
56 | omap_sdrc_init(NULL, NULL); | 38 | pdata_quirks_init(omap_dt_match_table); |
57 | |||
58 | of_platform_populate(NULL, omap_dt_match_table, NULL, NULL); | ||
59 | |||
60 | /* | ||
61 | * HACK: call display setup code for selected boards to enable omapdss. | ||
62 | * This will be removed when omapdss supports DT. | ||
63 | */ | ||
64 | if (of_machine_is_compatible("ti,omap4-panda")) { | ||
65 | omap4_panda_display_init_of(); | ||
66 | legacy_init_ehci_clk("auxclk3_ck"); | ||
67 | |||
68 | } | ||
69 | else if (of_machine_is_compatible("ti,omap4-sdp")) | ||
70 | omap_4430sdp_display_init_of(); | ||
71 | else if (of_machine_is_compatible("ti,omap5-uevm")) | ||
72 | legacy_init_ehci_clk("auxclk1_ck"); | ||
73 | } | 39 | } |
74 | 40 | ||
75 | #ifdef CONFIG_SOC_OMAP2420 | 41 | #ifdef CONFIG_SOC_OMAP2420 |
@@ -180,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)") | |||
180 | .init_irq = omap_intc_of_init, | 146 | .init_irq = omap_intc_of_init, |
181 | .handle_irq = omap3_intc_handle_irq, | 147 | .handle_irq = omap3_intc_handle_irq, |
182 | .init_machine = omap_generic_init, | 148 | .init_machine = omap_generic_init, |
149 | .init_late = am33xx_init_late, | ||
183 | .init_time = omap3_gptimer_timer_init, | 150 | .init_time = omap3_gptimer_timer_init, |
184 | .dt_compat = am33xx_boards_compat, | 151 | .dt_compat = am33xx_boards_compat, |
185 | .restart = am33xx_restart, | 152 | .restart = am33xx_restart, |
@@ -219,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") | |||
219 | .init_early = omap5_init_early, | 186 | .init_early = omap5_init_early, |
220 | .init_irq = omap_gic_of_init, | 187 | .init_irq = omap_gic_of_init, |
221 | .init_machine = omap_generic_init, | 188 | .init_machine = omap_generic_init, |
189 | .init_late = omap5_init_late, | ||
222 | .init_time = omap5_realtime_timer_init, | 190 | .init_time = omap5_realtime_timer_init, |
223 | .dt_compat = omap5_boards_compat, | 191 | .dt_compat = omap5_boards_compat, |
224 | .restart = omap44xx_restart, | 192 | .restart = omap44xx_restart, |
@@ -234,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = { | |||
234 | DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") | 202 | DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") |
235 | .map_io = am33xx_map_io, | 203 | .map_io = am33xx_map_io, |
236 | .init_early = am43xx_init_early, | 204 | .init_early = am43xx_init_early, |
205 | .init_late = am43xx_init_late, | ||
237 | .init_irq = omap_gic_of_init, | 206 | .init_irq = omap_gic_of_init, |
238 | .init_machine = omap_generic_init, | 207 | .init_machine = omap_generic_init, |
239 | .init_time = omap3_sync32k_timer_init, | 208 | .init_time = omap3_sync32k_timer_init, |
@@ -252,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)") | |||
252 | .smp = smp_ops(omap4_smp_ops), | 221 | .smp = smp_ops(omap4_smp_ops), |
253 | .map_io = omap5_map_io, | 222 | .map_io = omap5_map_io, |
254 | .init_early = dra7xx_init_early, | 223 | .init_early = dra7xx_init_early, |
224 | .init_late = dra7xx_init_late, | ||
255 | .init_irq = omap_gic_of_init, | 225 | .init_irq = omap_gic_of_init, |
256 | .init_machine = omap_generic_init, | 226 | .init_machine = omap_generic_init, |
257 | .init_time = omap5_realtime_timer_init, | 227 | .init_time = omap5_realtime_timer_init, |