summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorAdrian Alonso <adrian.alonso@nxp.com>2016-09-07 18:03:46 -0500
committerAdrian Alonso <adrian.alonso@nxp.com>2016-09-15 14:00:58 -0500
commit0ec2a019117bb2d59b9672a145b4684313d92782 (patch)
tree152b4a25ba257b42b821e33badb953ac8e154bdb /board/freescale
parent17a30851ad9dec60a27481bd695e09d1f38fe685 (diff)
downloadu-boot-imx-0ec2a019117bb2d59b9672a145b4684313d92782.zip
u-boot-imx-0ec2a019117bb2d59b9672a145b4684313d92782.tar.gz
u-boot-imx-0ec2a019117bb2d59b9672a145b4684313d92782.tar.bz2
MLK-13131: mx6qarm2: add fastboot and recovery supportrel_imx_4.1.15_2.0.0_ga
Add fastboot and recovery mode support for mx6qarm Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> (Cherry picked from commit 505e899ce582118da28ca1f4487ce7f179225bd7)
Diffstat (limited to 'board/freescale')
-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 61c3473..b384a2d 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -12,6 +12,7 @@
#include <asm/errno.h>
#include <asm/gpio.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>
@@ -19,6 +20,13 @@
#include <usb.h>
#include <asm/arch/sys_proto.h>
+#ifdef CONFIG_FSL_FASTBOOT
+#include <fsl_fastboot.h>
+#ifdef CONFIG_ANDROID_RECOVERY
+#include <recovery.h>
+#endif
+#endif /*CONFIG_FSL_FASTBOOT*/
+
DECLARE_GLOBAL_DATA_PTR;
#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \
@@ -328,3 +336,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