diff options
author | Urja Rannikko | 2019-05-16 21:48:41 +0000 |
---|---|---|
committer | Kever Yang | 2019-08-19 12:43:26 +0800 |
commit | 857f39d7b09804566b23e0f20fcb04601f2ecb52 (patch) | |
tree | 9c0d466a696bed124bf043b050640a95abaa9f74 /arch | |
parent | 7ba79f2696f0a6d0905cb080ac2649edc0248809 (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 'arch')
-rw-r--r-- | arch/arm/mach-stm32mp/cmd_poweroff.c | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/state.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_poweroff.c b/arch/arm/mach-stm32mp/cmd_poweroff.c index f54dd1daf23..62347425a06 100644 --- a/arch/arm/mach-stm32mp/cmd_poweroff.c +++ b/arch/arm/mach-stm32mp/cmd_poweroff.c @@ -14,7 +14,7 @@ int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) puts("poweroff ...\n"); mdelay(100); - ret = sysreset_walk(SYSRESET_POWER); + ret = sysreset_walk(SYSRESET_POWER_OFF); if (ret == -EINPROGRESS) mdelay(1000); diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 2333240fda8..dee5fde4f73 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -355,7 +355,6 @@ void state_reset_for_test(struct sandbox_state *state) { /* No reset yet, so mark it as such. Always allow power reset */ state->last_sysreset = SYSRESET_COUNT; - state->sysreset_allowed[SYSRESET_POWER] = true; state->sysreset_allowed[SYSRESET_POWER_OFF] = true; memset(&state->wdt, '\0', sizeof(state->wdt)); |