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>
#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[] = {
if (length < 2)
return -1;
+ if (!warm_reset())
+ return -1;
+
limit = (length < OMAP_REBOOT_REASON_SIZE) ? length :
OMAP_REBOOT_REASON_SIZE;