summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r--arch/arm/mach-omap2/pm.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index e742118fcfd..b06b22c3f64 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -17,6 +17,7 @@
#include <linux/export.h>
#include <linux/suspend.h>
#include <linux/cpu.h>
+#include <linux/of_platform.h>
#include <asm/system_misc.h>
@@ -227,6 +228,9 @@ static int omap_pm_begin(suspend_state_t state)
static void omap_pm_end(void)
{
cpu_idle_poll_ctrl(false);
+
+ if (cpu_is_omap34xx())
+ omap_prcm_irq_complete();
}
static void omap_pm_finish(void)
@@ -266,7 +270,12 @@ static void __init omap4_init_voltages(void)
static inline void omap_init_cpufreq(void)
{
- struct platform_device_info devinfo = { .name = "omap-cpufreq", };
+ struct platform_device_info devinfo = { };
+
+ if (!of_have_populated_dt())
+ devinfo.name = "omap-cpufreq";
+ else
+ devinfo.name = "cpufreq-cpu0";
platform_device_register_full(&devinfo);
}
@@ -300,10 +309,18 @@ int __init omap2_common_pm_late_init(void)
/* Smartreflex device init */
omap_devinit_smartreflex();
- /* cpufreq dummy device instantiation */
- omap_init_cpufreq();
+ } else {
+ struct device_node *np;
+ np = of_find_node_by_name(NULL, "omap_pimic");
+ if (np) {
+ of_platform_populate(np, NULL, NULL, NULL);
+ of_node_put(np);
+ }
}
+ /* cpufreq dummy device instantiation */
+ omap_init_cpufreq();
+
#ifdef CONFIG_SUSPEND
suspend_set_ops(&omap_pm_ops);
#endif