]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/lge/sniper/sniper.c
sniper: OMAP3 reboot mode support
[karo-tx-uboot.git] / board / lge / sniper / sniper.c
index d5318c4f32823ec37e7b0d298257f9592ed03ae9..44d422da1b97c624e16117ed9e981ded29189399 100644 (file)
@@ -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();