From c1649eb8f90c73539cc8bf6ea6b3dd6d4b0cb21e Mon Sep 17 00:00:00 2001 From: jixj Date: Mon, 23 Nov 2020 17:00:31 +0800 Subject: [PATCH] power/reset: Fix "hw_warmreset" can't be set Fix https://gerrit.mot.com/1778586 propagation error. The "reason" is default PON_RESTART_REASON_UNKNOWN (0), At the end, QC will set restart reg with "reason" so this reg will be override to 0 Change-Id: I3a0092edb6a29a1d3edd9fa79428115b7c590ffb Reviewed-on: https://gerrit.mot.com/1808858 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/power/reset/msm-poweroff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index 91c8360a5e6a..2ea1865d448b 100644 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -513,8 +513,7 @@ static void msm_restart_prepare(const char *cmd) /* force cold reboot */ qpnp_pon_system_pwr_off(PON_POWER_OFF_HARD_RESET); } else if (!strncmp(cmd, "hw_warmreset", 13)) { - qpnp_pon_set_restart_reason( - PON_RESTART_REASON_HW_WARMRESET); + reason = PON_RESTART_REASON_HW_WARMRESET; qpnp_pon_system_pwr_off(PON_POWER_OFF_WARM_RESET); pr_info("set system hw warmreset mode\n"); } else if (!strncmp(cmd, "post-hw_warmreset", 17)) {