diff options
author | Abhilash Kesavan <a.kesavan@samsung.com> | 2014-11-07 01:20:16 +0100 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-11-21 14:49:46 +0100 |
commit | adc548d77c22daa371d5217b382a139b593dec47 (patch) | |
tree | e8bf2f7eb460e4126053db2f4469aba631bc8ad6 /arch/arm/mach-exynos/platsmp.c | |
parent | ARM: EXYNOS: Add Suspend-to-RAM support for exynos5420 (diff) | |
download | linux-adc548d77c22daa371d5217b382a139b593dec47.tar.xz linux-adc548d77c22daa371d5217b382a139b593dec47.zip |
ARM: EXYNOS: Use MCPM call-backs to support S2R on exynos5420
Use the MCPM layer to handle core suspend/resume on Exynos5420.
Also, restore the entry address setup code post-resume.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/platsmp.c')
-rw-r--r-- | arch/arm/mach-exynos/platsmp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index adb36a8e8785..7a1ebfeeeeb8 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -126,6 +126,18 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) */ void exynos_cpu_power_down(int cpu) { + if (cpu == 0 && (of_machine_is_compatible("samsung,exynos5420") || + of_machine_is_compatible("samsung,exynos5800"))) { + /* + * Bypass power down for CPU0 during suspend. Check for + * the SYS_PWR_REG value to decide if we are suspending + * the system. + */ + int val = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG); + + if (!(val & S5P_CORE_LOCAL_PWR_EN)) + return; + } pmu_raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); } |