cpuidle: calxeda: add cpu_pm_enter/exit calls
authorRob Herring <rob.herring@calxeda.com>
Tue, 26 Feb 2013 22:16:53 +0000 (16:16 -0600)
committerRob Herring <rob.herring@calxeda.com>
Tue, 1 Oct 2013 21:30:18 +0000 (16:30 -0500)
Wnen powergating the core, we need to call cpu pm notifiers to save VFP
state (!SMP only) and resetting the breakpoint h/w.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-pm@vger.kernel.org
drivers/cpuidle/cpuidle-calxeda.c

index 34605847957269635b650997d51ac7eb9062416f..bed707ab6d6e14f9950b112c3184d2cb0e001f0a 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <linux/cpuidle.h>
+#include <linux/cpu_pm.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/of.h>
@@ -66,8 +67,11 @@ static int calxeda_pwrdown_idle(struct cpuidle_device *dev,
                                struct cpuidle_driver *drv,
                                int index)
 {
+       cpu_pm_enter();
        highbank_set_cpu_jump(smp_processor_id(), cpu_resume);
        cpu_suspend(0, calxeda_idle_finish);
+       cpu_pm_exit();
+
        return index;
 }