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 <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
jixj 2020-11-23 17:00:31 +08:00 • committed by Xiaojun Ji
commit c1649eb8f9

View file

@ -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)) {