power: reset: use hard resets by default for all restart commands
Present, hard resets are used only when rebooting for "recovery", "rtc", or "bootload" reboot commands or when the reboot command is an empty string. Perform hard resets for invalid reboot commands also, to avoid accidental warm resets if an invalid reboot command is mistakenly used. Continue to use warm resets for entry into download mode. This is required for collection of ramdumps. Change-Id: I71f657e9c8c20abcbbda86d789c843060c8ffce7 Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This commit is contained in:
parent
64efabe747
commit
69c5effef6
1 changed files with 2 additions and 8 deletions
|
@ -229,14 +229,8 @@ static void msm_restart_prepare(const char *cmd)
|
|||
#endif
|
||||
|
||||
if (qpnp_pon_check_hard_reset_stored()) {
|
||||
/* Set warm reset as true when device is in dload mode
|
||||
* or device doesn't boot up into recovery, bootloader or rtc.
|
||||
*/
|
||||
if (get_dload_mode() ||
|
||||
((cmd != NULL && cmd[0] != '\0') &&
|
||||
strcmp(cmd, "recovery") &&
|
||||
strcmp(cmd, "bootloader") &&
|
||||
strcmp(cmd, "rtc")))
|
||||
/* Set warm reset as true when device is in dload mode */
|
||||
if (get_dload_mode())
|
||||
need_warm_reset = true;
|
||||
} else {
|
||||
need_warm_reset = (get_dload_mode() ||
|
||||
|
|
Loading…
Add table
Reference in a new issue