summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-02-27 19:19:08 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:12:54 -0400
commit69847dd8f0fd8ef7a5c751a6f117879b501c39fc (patch)
tree9f6d28bb2beb7df930767bf2cee0795e168250c5 /arch/arm/cpu/armv7
parentfaec3f984120f1bee3f193c339f15c451b6d26e1 (diff)
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 <contact@paulk.fr>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r--arch/arm/cpu/armv7/omap4/boot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/omap4/boot.c b/arch/arm/cpu/armv7/omap4/boot.c
index bae49f4755..7f5791e9ed 100644
--- a/arch/arm/cpu/armv7/omap4/boot.c
+++ b/arch/arm/cpu/armv7/omap4/boot.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/omap_common.h>
+#include <asm/arch/sys_proto.h>
#include <spl.h>
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;