summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Alonso <adrian.alonso@nxp.com>2016-07-29 16:14:51 -0500
committerAdrian Alonso <adrian.alonso@nxp.com>2016-08-26 10:46:33 -0500
commit1904ba76548a5585aafe665707c7edfc05dce168 (patch)
tree27b05f3e7b3db321985dd5854e59c16d46d49bad
parentb95fa20e669cb8f4e8df3db2480a89aa08c44192 (diff)
downloadu-boot-imx-1904ba76548a5585aafe665707c7edfc05dce168.zip
u-boot-imx-1904ba76548a5585aafe665707c7edfc05dce168.tar.gz
u-boot-imx-1904ba76548a5585aafe665707c7edfc05dce168.tar.bz2
MLK-13131: mx6qarm2: add fastboot and recovery support
Add fastboot and recovery mode support for mx6qarm Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
-rw-r--r--board/freescale/mx6qarm2/mx6qarm2.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index e08ef1e..56472dd 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -16,6 +16,7 @@
#include <asm/imx-common/video.h>
#include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/iomux-v3.h>
+#include <asm/imx-common/boot_mode.h>
#include <mmc.h>
#include <fsl_esdhc.h>
#include <miiphy.h>
@@ -23,6 +24,13 @@
#include <usb.h>
#include <i2c.h>
+#ifdef CONFIG_FSL_FASTBOOT
+#include <fsl_fastboot.h>
+#ifdef CONFIG_ANDROID_RECOVERY
+#include <recovery.h>
+#endif
+#endif /*CONFIG_FSL_FASTBOOT*/
+
#ifdef CONFIG_MAX7310_IOEXP
#include <gpio_exp.h>
#endif
@@ -590,3 +598,28 @@ void ldo_mode_set(int ldo_bypass)
return;
}
#endif
+
+#ifdef CONFIG_FSL_FASTBOOT
+void board_fastboot_setup(void)
+{
+ if (!getenv("fastboot_dev"))
+ setenv("fastboot_dev", "mmc0");
+ if (!getenv("bootcmd"))
+ setenv("bootcmd", "boota mmc0");
+}
+
+#ifdef CONFIG_ANDROID_RECOVERY
+int check_recovery_cmd_file(void) {
+ return 0;
+}
+
+void board_recovery_setup(void)
+{
+ if (!getenv("bootcmd_android_recovery"))
+ setenv("bootcmd_android_recovery", "boota mmc0 recovery");
+
+ printf("setup env for recovery..\n");
+ setenv("bootcmd", "run bootcmd_android_recovery");
+}
+#endif
+#endif