summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-05-14 22:49:31 -0700
committerYe Li <ye.li@nxp.com>2020-04-26 23:26:25 -0700
commita2018ab0d13fca27e792f05b5f98e9621e95bdd4 (patch)
tree5b98fbb1bf2942169af3c7bd0e38d94cac894be0 /common/board_r.c
parent6932a10a1a4b22a682736bc364c1e37720566af5 (diff)
MLK-18591-3 android: Add FSL android fastboot support
Porting the FSL android fastboot features from imx u-boot v2018.03 to support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m. The UUU commands like UCmd and ACmd are also added. Users need set CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature. Signed-off-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8) (cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 97dad1d39d..ed4dc4edb0 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -64,6 +64,9 @@
#if defined(CONFIG_GPIO_HOG)
#include <asm/gpio.h>
#endif
+#ifdef CONFIG_FSL_FASTBOOT
+#include <fb_fsl.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -663,6 +666,20 @@ static int initr_avbkey(void)
}
#endif
+#ifdef CONFIG_FSL_FASTBOOT
+static int initr_fastboot_setup(void)
+{
+ fastboot_setup();
+ return 0;
+}
+
+static int initr_check_fastboot(void)
+{
+ fastboot_run_bootmode();
+ return 0;
+}
+#endif
+
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
@@ -840,6 +857,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_BOARD_LATE_INIT
board_late_init,
#endif
+#ifdef CONFIG_FSL_FASTBOOT
+ initr_fastboot_setup,
+#endif
#if defined(CONFIG_SCSI) && !defined(CONFIG_DM_SCSI)
INIT_FUNC_WATCHDOG_RESET
initr_scsi,
@@ -879,6 +899,9 @@ static init_fnc_t init_sequence_r[] = {
#if defined(AVB_RPMB) && !defined(CONFIG_SPL)
initr_avbkey,
#endif
+#ifdef CONFIG_FSL_FASTBOOT
+ initr_check_fastboot,
+#endif
run_main_loop,
};