From 2d93b550acd5fcdfee7e2cb09e38564e4620a381 Mon Sep 17 00:00:00 2001 From: Adrian Alonso Date: Wed, 7 Sep 2016 18:03:46 -0500 Subject: MLK-13131: mx6qarm2: add fastboot and recovery support Add fastboot and recovery mode support for mx6qarm Signed-off-by: Adrian Alonso (cherry picked from commit 505e899ce582118da28ca1f4487ce7f179225bd7) --- board/freescale/mx6qarm2/mx6qarm2.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c index 47169fa..618501a 100644 --- a/board/freescale/mx6qarm2/mx6qarm2.c +++ b/board/freescale/mx6qarm2/mx6qarm2.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -19,6 +20,13 @@ #include #include +#ifdef CONFIG_FSL_FASTBOOT +#include +#ifdef CONFIG_ANDROID_RECOVERY +#include +#endif +#endif /*CONFIG_FSL_FASTBOOT*/ + DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ @@ -313,3 +321,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 -- cgit v1.1