summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-07-20 15:17:12 +0200
committerTom Rini <trini@konsulko.com>2015-08-12 20:47:37 -0400
commit957efd4b5766e5ab68b032615c1a99f89ad01d86 (patch)
treeeea0947e6dc653e2e2721d3aa48636f26e235493 /board
parent0257930ba039e3074eb7975685beb1c482a61080 (diff)
downloadtalos-obmc-uboot-957efd4b5766e5ab68b032615c1a99f89ad01d86.tar.gz
talos-obmc-uboot-957efd4b5766e5ab68b032615c1a99f89ad01d86.zip
sniper: OMAP3 reboot mode support
This adds support for the omap3 reboot mode mechanism and exports the reboot mode via an environment variable, that is used in the boot command to make it possible to boot from the recovery partition. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r--board/lge/sniper/sniper.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/lge/sniper/sniper.c b/board/lge/sniper/sniper.c
index d5318c4f32..44d422da1b 100644
--- a/board/lge/sniper/sniper.c
+++ b/board/lge/sniper/sniper.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
#include <dm.h>
+#include <linux/ctype.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mem.h>
@@ -67,6 +68,23 @@ int board_init(void)
return 0;
}
+int misc_init_r(void)
+{
+ char reboot_mode[2] = { 0 };
+
+ /* Reboot mode */
+
+ reboot_mode[0] = omap_reboot_mode();
+ if (reboot_mode[0] > 0 && isascii(reboot_mode[0])) {
+ if (!getenv("reboot-mode"))
+ setenv("reboot-mode", (char *)reboot_mode);
+
+ omap_reboot_mode_clear();
+ }
+
+ return 0;
+}
+
void set_muxconf_regs(void)
{
MUX_SNIPER();
OpenPOWER on IntegriCloud