msm: restart: clear the restart reason when the cmd makes no sense

* This principally was identified when the R recovery started
  issuing reboot commands such as "userrequested,recovery" or
  "userrequested,fastboot". While it's not 100% clear that
  userrequested is supposed to be followed by a reboot *source* as
  opposed to a target, it illuminated the fact that our kernel gets
  stuck rebooting to the same target/reason when an unknown command
  is issued.
* It seems much more logical to normal people that the kernel go ahead
  and reboot to the "normal" (read: Android system) target when the
  one passed to the kernel isn't known, as opposed to getting stuck
  in something like recovery forever.

Change-Id: Id63a31c9855b72955b89694ecac522e6569d84ac
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
Kevin F. Haggerty
2020-12-07 17:19:30 +01:00
committed by Francescodario Cuzzocrea
parent 014515fc3a
commit 983729ba91
+1 -1
View File
@@ -408,7 +408,7 @@ static void msm_restart_prepare(const char *cmd)
}
else
#endif
__raw_writel(0x77665501, restart_reason);
__raw_writel(0x12345678, restart_reason);
}
printk(KERN_NOTICE "%s : restart_reason = 0x%x\n",