提交 69847dd8 编写于 作者: P Paul Kocialkowski 提交者: Tom Rini

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: NPaul Kocialkowski <contact@paulk.fr>
上级 faec3f98
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <common.h> #include <common.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/omap_common.h> #include <asm/omap_common.h>
#include <asm/arch/sys_proto.h>
#include <spl.h> #include <spl.h>
static u32 boot_devices[] = { static u32 boot_devices[] = {
...@@ -67,6 +68,9 @@ int omap_reboot_mode(char *mode, unsigned int length) ...@@ -67,6 +68,9 @@ int omap_reboot_mode(char *mode, unsigned int length)
if (length < 2) if (length < 2)
return -1; return -1;
if (!warm_reset())
return -1;
limit = (length < OMAP_REBOOT_REASON_SIZE) ? length : limit = (length < OMAP_REBOOT_REASON_SIZE) ? length :
OMAP_REBOOT_REASON_SIZE; OMAP_REBOOT_REASON_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册