Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb55b1fe authored by Matt Wagantall's avatar Matt Wagantall
Browse files

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: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 2185f439
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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() ||