summaryrefslogtreecommitdiff
path: root/board/gateworks/gw_ventana/gw_ventana_spl.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-26 10:38:01 -0400
committerTom Rini <trini@konsulko.com>2015-05-26 10:38:01 -0400
commit9bea236b3402a262772b66d055ec6431cbd3ba87 (patch)
tree8347dda9cb6ec9ad0d1bb15040257e01f8f31fc0 /board/gateworks/gw_ventana/gw_ventana_spl.c
parentd43e15421014c17b90c3e288e3eff18ad8aaf346 (diff)
parent1022b85cb0e143b4f3a8e6c7d9258d516920d464 (diff)
downloadu-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.zip
u-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.tar.gz
u-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'board/gateworks/gw_ventana/gw_ventana_spl.c')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana_spl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index 79cb594..9f5d2b1 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -14,6 +14,7 @@
#include <asm/imx-common/boot_mode.h>
#include <asm/imx-common/iomux-v3.h>
#include <asm/imx-common/mxc_i2c.h>
+#include <environment.h>
#include <spl.h>
#include "gsc.h"
@@ -551,7 +552,29 @@ void spl_board_init(void)
default:
puts("Unknown boot device\n");
}
+
+ /* PMIC init */
+ setup_pmic();
+}
+
+#ifdef CONFIG_SPL_OS_BOOT
+/* return 1 if we wish to boot to uboot vs os (falcon mode) */
+int spl_start_uboot(void)
+{
+ int ret = 1;
+
+ debug("%s\n", __func__);
+#ifdef CONFIG_SPL_ENV_SUPPORT
+ env_init();
+ env_relocate_spec();
+ debug("boot_os=%s\n", getenv("boot_os"));
+ if (getenv_yesno("boot_os") == 1)
+ ret = 0;
+#endif
+ debug("%s booting %s\n", __func__, ret ? "uboot" : "linux");
+ return ret;
}
+#endif
void reset_cpu(ulong addr)
{