summaryrefslogtreecommitdiff
path: root/drivers/sysreset
diff options
context:
space:
mode:
authorUrja Rannikko <urjaman@gmail.com>2019-05-16 21:48:41 +0000
committerKever Yang <kever.yang@rock-chips.com>2019-08-19 12:43:26 +0800
commit857f39d7b09804566b23e0f20fcb04601f2ecb52 (patch)
tree9c0d466a696bed124bf043b050640a95abaa9f74 /drivers/sysreset
parent7ba79f2696f0a6d0905cb080ac2649edc0248809 (diff)
sysreset: switch to using SYSRESET_POWER_OFF for poweroff
It seems that SYSRESET_POWER_OFF was added recently, and all previous code used SYSRESET_POWER for poweroff. SYSRESET_POWER is supposed to be a PMIC-level power cycle, not a poweroff. (Comment by Simon Glass) SYSRESET_POWER means to do a power reset (removing and reinstating all power) SYSRESET_POWER_OFF means to turn the device off and leave it off Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> (Update comment to help understand the patch) Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/sysreset')
-rw-r--r--drivers/sysreset/sysreset_psci.c2
-rw-r--r--drivers/sysreset/sysreset_sandbox.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c
index de2ec8aeb1..c7907b3226 100644
--- a/drivers/sysreset/sysreset_psci.c
+++ b/drivers/sysreset/sysreset_psci.c
@@ -18,7 +18,7 @@ static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)
case SYSRESET_COLD:
function_id = PSCI_0_2_FN_SYSTEM_RESET;
break;
- case SYSRESET_POWER:
+ case SYSRESET_POWER_OFF:
function_id = PSCI_0_2_FN_SYSTEM_OFF;
break;
default:
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 7dfd89460f..69c22a7000 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -57,13 +57,13 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
case SYSRESET_COLD:
state->last_sysreset = type;
break;
- case SYSRESET_POWER:
+ case SYSRESET_POWER_OFF:
state->last_sysreset = type;
if (!state->sysreset_allowed[type])
return -EACCES;
sandbox_exit();
break;
- case SYSRESET_POWER_OFF:
+ case SYSRESET_POWER:
if (!state->sysreset_allowed[type])
return -EACCES;
sandbox_exit();