diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-09-26 20:02:51 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-01 16:34:16 -0500 |
commit | dd68eb02e4598d81e9e42400ccbd2cc42f012bfa (patch) | |
tree | 4d66a3da8725f9216feb945821c42fa99bce1d83 /arch/arm/mach-highbank/pm.c | |
parent | 97fc4de3d93fea934b0ec8332465b9f1899a9adb (diff) | |
download | op-kernel-dev-dd68eb02e4598d81e9e42400ccbd2cc42f012bfa.zip op-kernel-dev-dd68eb02e4598d81e9e42400ccbd2cc42f012bfa.tar.gz |
ARM: highbank: adapt to use ARM PSCI calls
This adapts highbank to use psci for smp_ops and the cpu_suspend function
for suspend/resume.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/arm/mach-highbank/pm.c')
-rw-r--r-- | arch/arm/mach-highbank/pm.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 04eddb4..7f2bd85 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c @@ -16,27 +16,19 @@ #include <linux/cpu_pm.h> #include <linux/init.h> -#include <linux/io.h> #include <linux/suspend.h> -#include <asm/cacheflush.h> -#include <asm/proc-fns.h> #include <asm/suspend.h> - -#include "core.h" -#include "sysregs.h" +#include <asm/psci.h> static int highbank_suspend_finish(unsigned long val) { - outer_flush_all(); - outer_disable(); - - highbank_set_pwr_suspend(); - - cpu_do_idle(); + const struct psci_power_state ps = { + .type = PSCI_POWER_STATE_TYPE_POWER_DOWN, + .affinity_level = 1, + }; - highbank_clear_pwr_request(); - return 0; + return psci_ops.cpu_suspend(ps, __pa(cpu_resume)); } static int highbank_pm_enter(suspend_state_t state) @@ -44,15 +36,11 @@ static int highbank_pm_enter(suspend_state_t state) cpu_pm_enter(); cpu_cluster_pm_enter(); - highbank_set_cpu_jump(0, cpu_resume); cpu_suspend(0, highbank_suspend_finish); cpu_cluster_pm_exit(); cpu_pm_exit(); - highbank_smc1(0x102, 0x1); - if (scu_base_addr) - scu_enable(scu_base_addr); return 0; } @@ -63,5 +51,8 @@ static const struct platform_suspend_ops highbank_pm_ops = { void __init highbank_pm_init(void) { + if (!psci_ops.cpu_suspend) + return; + suspend_set_ops(&highbank_pm_ops); } |