35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From b3272daf1df2eb8b96654d2884eab391f85549ea Mon Sep 17 00:00:00 2001
|
|
From: Andre Przywara <andre.przywara@arm.com>
|
|
Date: Fri, 16 Dec 2016 01:32:36 +0000
|
|
Subject: [PATCH] sunxi: power: move system power off into set_voltage()
|
|
function
|
|
|
|
Instead of directly poking the appropriate AXP PMIC register to turn the
|
|
voltage for the ARM CPU cores off completely, call the newly exported
|
|
function to set the CPU voltage with a negative argument.
|
|
This abstracts the power off functionality from the actual PMIC used.
|
|
|
|
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
|
---
|
|
plat/sun50iw1p1/plat_pm.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/plat/sun50iw1p1/plat_pm.c b/plat/sun50iw1p1/plat_pm.c
|
|
index ec26248e0..c2ef5a6b7 100644
|
|
--- a/plat/sun50iw1p1/plat_pm.c
|
|
+++ b/plat/sun50iw1p1/plat_pm.c
|
|
@@ -254,8 +254,11 @@ static int32_t sunxi_affinst_suspend_finish(uint64_t mpidr,
|
|
******************************************************************************/
|
|
static void __dead2 sunxi_system_off(void)
|
|
{
|
|
- sunxi_pmic_write(0x32, sunxi_pmic_read(0x32) | 0x80);
|
|
- ERROR("PSCI system shutdown: still alive ...\n");
|
|
+ int ret;
|
|
+
|
|
+ ret = sunxi_power_set_cpu_voltage(-1);
|
|
+
|
|
+ ERROR("PSCI system shutdown: %d: still alive ...\n", ret);
|
|
|
|
wfi();
|
|
panic();
|