summaryrefslogtreecommitdiffstats
path: root/board/amazon/kc1/kc1.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-02-27 19:19:09 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:12:55 -0400
commit7c0a4b795589511a4880ca268d03a140551e5b4e (patch)
treed936094e71feda7cda1c670d9f9437e9db705eda /board/amazon/kc1/kc1.c
parent69847dd8f0fd8ef7a5c751a6f117879b501c39fc (diff)
downloadtalos-obmc-uboot-7c0a4b795589511a4880ca268d03a140551e5b4e.tar.gz
talos-obmc-uboot-7c0a4b795589511a4880ca268d03a140551e5b4e.zip
kc1: OMAP4 reboot mode support
This adds support for the omap4 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 or fastboot. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'board/amazon/kc1/kc1.c')
-rw-r--r--board/amazon/kc1/kc1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index 29d9c648c7..d526695b7c 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -85,6 +85,19 @@ int board_init(void)
int misc_init_r(void)
{
+ char reboot_mode[2] = { 0 };
+
+ /* Reboot mode */
+
+ omap_reboot_mode(reboot_mode, sizeof(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();
+ }
+
/* Serial number */
omap_die_id_serial();
@@ -123,6 +136,11 @@ void get_board_serial(struct tag_serialnr *serialnr)
omap_die_id_get_board_serial(serialnr);
}
+int fb_set_reboot_flag(void)
+{
+ return omap_reboot_mode_store("b");
+}
+
#ifndef CONFIG_SPL_BUILD
int board_mmc_init(bd_t *bis)
{
OpenPOWER on IntegriCloud