fix gpio interrupt-cells property on AM335x
[openwrt/openwrt.git] / target / linux / omap / patches-3.12 / 803-ARM_OMAP2plus_add_missing_lateinit_hook_for_calling_pm_late_init.patch
1 From 765e7a067eebf372687048ba0242e27f43cf0d71 Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Wed, 16 Oct 2013 15:39:02 +0000
4 Subject: ARM: OMAP2+: add missing lateinit hook for calling pm late init
5
6 AM335x, AM43xx, OMAP5 and DRA7 have missing late init hook. Introduce
7 SoC specific hook with a call to OMAP2+ generic lateinit hook. This
8 allows the generic late initializations such as cpufreq hooks to be
9 active.
10
11 Based on out-of-tree patches that need to be introduced in
12 mainline, this introduction allows us to provide the foundation for
13 further SoC specific features as they are developed.
14
15 Cc: Benoit Cousson <bcousson@baylibre.com>
16 Cc: Kevin Hilman <khilman@deeprootsystems.com>
17 Cc: Paul Walmsley <paul@pwsan.com>
18 Cc: Tony Lindgren <tony@atomide.com>
19 Signed-off-by: Nishanth Menon <nm@ti.com>
20 Signed-off-by: Tony Lindgren <tony@atomide.com>
21 ---
22 diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
23 index 3896b12..19f1652 100644
24 --- a/arch/arm/mach-omap2/board-generic.c
25 +++ b/arch/arm/mach-omap2/board-generic.c
26 @@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
27 .init_irq = omap_intc_of_init,
28 .handle_irq = omap3_intc_handle_irq,
29 .init_machine = omap_generic_init,
30 + .init_late = am33xx_init_late,
31 .init_time = omap3_gptimer_timer_init,
32 .dt_compat = am33xx_boards_compat,
33 .restart = am33xx_restart,
34 @@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
35 .init_early = omap5_init_early,
36 .init_irq = omap_gic_of_init,
37 .init_machine = omap_generic_init,
38 + .init_late = omap5_init_late,
39 .init_time = omap5_realtime_timer_init,
40 .dt_compat = omap5_boards_compat,
41 .restart = omap44xx_restart,
42 @@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = {
43 DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
44 .map_io = am33xx_map_io,
45 .init_early = am43xx_init_early,
46 + .init_late = am43xx_init_late,
47 .init_irq = omap_gic_of_init,
48 .init_machine = omap_generic_init,
49 .init_time = omap3_sync32k_timer_init,
50 @@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
51 .smp = smp_ops(omap4_smp_ops),
52 .map_io = omap5_map_io,
53 .init_early = dra7xx_init_early,
54 + .init_late = dra7xx_init_late,
55 .init_irq = omap_gic_of_init,
56 .init_machine = omap_generic_init,
57 .init_time = omap5_realtime_timer_init,
58 diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
59 index c6aebf0..f7644fe 100644
60 --- a/arch/arm/mach-omap2/common.h
61 +++ b/arch/arm/mach-omap2/common.h
62 @@ -98,6 +98,7 @@ void am35xx_init_early(void);
63 void ti81xx_init_early(void);
64 void am33xx_init_early(void);
65 void am43xx_init_early(void);
66 +void am43xx_init_late(void);
67 void omap4430_init_early(void);
68 void omap5_init_early(void);
69 void omap3_init_late(void); /* Do not use this one */
70 @@ -109,8 +110,11 @@ void omap35xx_init_late(void);
71 void omap3630_init_late(void);
72 void am35xx_init_late(void);
73 void ti81xx_init_late(void);
74 +void am33xx_init_late(void);
75 +void omap5_init_late(void);
76 int omap2_common_pm_late_init(void);
77 void dra7xx_init_early(void);
78 +void dra7xx_init_late(void);
79
80 #ifdef CONFIG_SOC_BUS
81 void omap_soc_device_init(void);
82 diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
83 index ff2113c..a2cbb44 100644
84 --- a/arch/arm/mach-omap2/io.c
85 +++ b/arch/arm/mach-omap2/io.c
86 @@ -583,6 +583,11 @@ void __init am33xx_init_early(void)
87 omap_hwmod_init_postsetup();
88 omap_clk_init = am33xx_clk_init;
89 }
90 +
91 +void __init am33xx_init_late(void)
92 +{
93 + omap_common_late_init();
94 +}
95 #endif
96
97 #ifdef CONFIG_SOC_AM43XX
98 @@ -596,6 +601,11 @@ void __init am43xx_init_early(void)
99 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
100 omap3xxx_check_revision();
101 }
102 +
103 +void __init am43xx_init_late(void)
104 +{
105 + omap_common_late_init();
106 +}
107 #endif
108
109 #ifdef CONFIG_ARCH_OMAP4
110 @@ -651,6 +661,11 @@ void __init omap5_init_early(void)
111 omap54xx_hwmod_init();
112 omap_hwmod_init_postsetup();
113 }
114 +
115 +void __init omap5_init_late(void)
116 +{
117 + omap_common_late_init();
118 +}
119 #endif
120
121 #ifdef CONFIG_SOC_DRA7XX
122 @@ -671,6 +686,11 @@ void __init dra7xx_init_early(void)
123 dra7xx_hwmod_init();
124 omap_hwmod_init_postsetup();
125 }
126 +
127 +void __init dra7xx_init_late(void)
128 +{
129 + omap_common_late_init();
130 +}
131 #endif
132
133
134 --
135 cgit v0.9.2