diff options
author | Tony Lindgren <tony@atomide.com> | 2018-04-16 13:23:46 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2018-04-30 15:04:51 -0400 |
commit | 02b83dcb3db7974cc25834b67ffac7eb90ce56ac (patch) | |
tree | 0769846454f047728c1ee301342ebec607865a43 /arch/arm/mach-omap2/pm.c | |
parent | 71941002ad140cba0ee922a2bc9f5dcf9ac70b54 (diff) |
ARM: OMAP2+: Initialize SoC PM later
There's no need to probe devices until at module_init time and we
currently have at least PM trying to use I2C for PMICs early on.
As only a part of the SoC init_early is SoC specific, we only need to call
the SoC specific PM init function. And we can modify omap2_common_pm_late_init()
so it becomes a late_initcall().
Note that this changes am335x to call omap2_clk_enable_autoidle_all() that
seems to be missing currently.
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index b98c46d7f112..ca03af8fe43f 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -230,8 +230,20 @@ static void __init omap4_init_voltages(void) | |||
230 | omap2_set_init_voltage("iva", "dpll_iva_m5x2_ck", "iva"); | 230 | omap2_set_init_voltage("iva", "dpll_iva_m5x2_ck", "iva"); |
231 | } | 231 | } |
232 | 232 | ||
233 | int __maybe_unused omap_pm_nop_init(void) | ||
234 | { | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | int (*omap_pm_soc_init)(void); | ||
239 | |||
233 | int __init omap2_common_pm_late_init(void) | 240 | int __init omap2_common_pm_late_init(void) |
234 | { | 241 | { |
242 | int error; | ||
243 | |||
244 | if (!omap_pm_soc_init) | ||
245 | return 0; | ||
246 | |||
235 | /* Init the voltage layer */ | 247 | /* Init the voltage layer */ |
236 | omap3_twl_init(); | 248 | omap3_twl_init(); |
237 | omap4_twl_init(); | 249 | omap4_twl_init(); |
@@ -244,5 +256,12 @@ int __init omap2_common_pm_late_init(void) | |||
244 | /* Smartreflex device init */ | 256 | /* Smartreflex device init */ |
245 | omap_devinit_smartreflex(); | 257 | omap_devinit_smartreflex(); |
246 | 258 | ||
259 | error = omap_pm_soc_init(); | ||
260 | if (error) | ||
261 | pr_warn("%s: pm soc init failed: %i\n", __func__, error); | ||
262 | |||
263 | omap2_clk_enable_autoidle_all(); | ||
264 | |||
247 | return 0; | 265 | return 0; |
248 | } | 266 | } |
267 | omap_late_initcall(omap2_common_pm_late_init); | ||