diff options
author | Ye Li <ye.li@nxp.com> | 2019-05-14 22:49:31 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-04-06 15:58:47 +0800 |
commit | 83e05a1be61b88c220d7677122376a60c8b688ff (patch) | |
tree | 0f91464ae78f33ab5d34b7d92e2021d7000b567a /common | |
parent | 0c537b10401e94620ee110c21b5cfcaaa5c05121 (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)
(cherry picked from commit 9f99e9de1d37e9f6c02c1b27348ea3dcdab94569)
(cherry picked from commit 6ae1c043431a4987f563026b179b33945a5880ee)
(cherry picked from commit 806c9ba15e8742a23b1b9147d9b85219133b6f10)
(cherry picked from commit 1357b84595d617f6ebc09f23e7b9d14b080f8048)
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c index 7eba1bf1e7..c885e46760 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -61,6 +61,9 @@ #include <wdt.h> #include <asm-generic/gpio.h> #include <efi_loader.h> +#ifdef CONFIG_FSL_FASTBOOT +#include <fb_fsl.h> +#endif DECLARE_GLOBAL_DATA_PTR; @@ -582,6 +585,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 @@ -764,6 +781,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, @@ -802,6 +822,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, }; |