]> git.sur5r.net Git - u-boot/commit
kc1: Proper reboot mode and boot reason validation
authorPaul Kocialkowski <contact@paulk.fr>
Tue, 29 Mar 2016 12:16:26 +0000 (14:16 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 1 Apr 2016 21:18:06 +0000 (17:18 -0400)
commit523849a0887c2d400d379eb0bce5ec74fc7a4dcd
treeb997c0b16ea42889684a6e1281dcf9ea4fd04d1e
parentc15ab5be8ff3d07b1afafac9f1e79b3e37ab8624
kc1: Proper reboot mode and boot reason validation

With the previous implementation, rebooting without registering a recognized
reboot mode would end up with U-Boot checking for a valid power-on reason, which
might result in the device turning off (e.g. with no USB cable attached and no
buttons pressed).

Since this approach is not viable (breaks reboot in most cases), the validity of
the reboot reason is checked (in turn, by checking that a warm reset happened,
as there is no magic) to detect a reboot and the 'o' char is recognized to
indicate that power-off is required. Still, that might be overridden by the
detection of usual power-on reasons, on purpose.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
board/amazon/kc1/kc1.c