From: Paul Kocialkowski Date: Sat, 27 Feb 2016 18:19:08 +0000 (+0100) Subject: omap4: Check warm reset for reboot mode validity X-Git-Tag: v2016.05-rc1~393 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69847dd8f0fd8ef7a5c751a6f117879b501c39fc;p=platform%2Fkernel%2Fu-boot.git omap4: Check warm reset for reboot mode validity Since the SAR registers are filled with garbage on cold reset, this checks for a warm reset to assert the validity of reboot mode. Signed-off-by: Paul Kocialkowski --- diff --git a/arch/arm/cpu/armv7/omap4/boot.c b/arch/arm/cpu/armv7/omap4/boot.c index bae49f4..7f5791e 100644 --- a/arch/arm/cpu/armv7/omap4/boot.c +++ b/arch/arm/cpu/armv7/omap4/boot.c @@ -9,6 +9,7 @@ #include #include #include +#include #include static u32 boot_devices[] = { @@ -67,6 +68,9 @@ int omap_reboot_mode(char *mode, unsigned int length) if (length < 2) return -1; + if (!warm_reset()) + return -1; + limit = (length < OMAP_REBOOT_REASON_SIZE) ? length : OMAP_REBOOT_REASON_SIZE;