From: Luo Ji Date: Wed, 21 Mar 2018 07:46:26 +0000 (+0800) Subject: MA-11601 [Android] Use default usb controller in fastboot for imx8qm/imx8qxp X-Git-Tag: rel_imx_4.9.88_2.0.0_ga~23 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=ee909cf54f3db7be1318b0253c96bd103f614b6c;p=u-boot.git MA-11601 [Android] Use default usb controller in fastboot for imx8qm/imx8qxp Set default usb controller index to 1 so "fastboot " will be equal to "fastboot 1", this is to sync the way we get used to to enter the fastboot mode. Change-Id: If8e402eed8dae98def57f032c44af55c6382ce56 Signed-off-by: Luo Ji --- diff --git a/cmd/fastboot.c b/cmd/fastboot.c index 488822a2ee..6503324cdd 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -21,9 +21,12 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (argc < 2) return CMD_RET_USAGE; - +#ifdef CONFIG_FASTBOOT_USB_DEV + controller_index = CONFIG_FASTBOOT_USB_DEV; +#else usb_controller = argv[1]; controller_index = simple_strtoul(usb_controller, NULL, 0); +#endif ret = board_usb_init(controller_index, USB_INIT_DEVICE); if (ret) { diff --git a/include/configs/imx8qm_arm2_android.h b/include/configs/imx8qm_arm2_android.h index b2bf785eb0..8f6c4e16a1 100644 --- a/include/configs/imx8qm_arm2_android.h +++ b/include/configs/imx8qm_arm2_android.h @@ -36,6 +36,7 @@ #define CONFIG_FASTBOOT_FLASH #define CONFIG_FSL_FASTBOOT +#define CONFIG_FASTBOOT_USB_DEV 1 #define CONFIG_ANDROID_RECOVERY #if defined CONFIG_SYS_BOOT_SATA diff --git a/include/configs/imx8qm_mek_android.h b/include/configs/imx8qm_mek_android.h index 63c226e0e7..33122b3568 100644 --- a/include/configs/imx8qm_mek_android.h +++ b/include/configs/imx8qm_mek_android.h @@ -42,6 +42,7 @@ #define CONFIG_FASTBOOT_FLASH #define CONFIG_FSL_FASTBOOT +#define CONFIG_FASTBOOT_USB_DEV 1 #define CONFIG_ANDROID_RECOVERY #if defined CONFIG_SYS_BOOT_SATA diff --git a/include/configs/imx8qxp_arm2_android.h b/include/configs/imx8qxp_arm2_android.h index cc98c72c6b..f1850c62ee 100644 --- a/include/configs/imx8qxp_arm2_android.h +++ b/include/configs/imx8qxp_arm2_android.h @@ -36,6 +36,7 @@ #endif #define CONFIG_FSL_FASTBOOT +#define CONFIG_FASTBOOT_USB_DEV 1 #define CONFIG_ANDROID_RECOVERY #if defined CONFIG_SYS_BOOT_SATA diff --git a/include/configs/imx8qxp_mek_android.h b/include/configs/imx8qxp_mek_android.h index 02a22462a4..e7a2d453e8 100644 --- a/include/configs/imx8qxp_mek_android.h +++ b/include/configs/imx8qxp_mek_android.h @@ -38,6 +38,7 @@ #define CONFIG_FASTBOOT_FLASH #define CONFIG_FSL_FASTBOOT +#define CONFIG_FASTBOOT_USB_DEV 1 #define CONFIG_ANDROID_RECOVERY #if defined CONFIG_SYS_BOOT_SATA