MA-11601 [Android] Use default usb controller in fastboot for imx8qm/imx8qxp
authorLuo Ji <ji.luo@nxp.com>
Wed, 21 Mar 2018 07:46:26 +0000 (15:46 +0800)
committerLuo Ji <ji.luo@nxp.com>
Wed, 28 Mar 2018 02:38:10 +0000 (10:38 +0800)
Set default usb controller index to 1 so "fastboot <any-string>" 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 <ji.luo@nxp.com>
cmd/fastboot.c
include/configs/imx8qm_arm2_android.h
include/configs/imx8qm_mek_android.h
include/configs/imx8qxp_arm2_android.h
include/configs/imx8qxp_mek_android.h

index 488822a..6503324 100644 (file)
@@ -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) {
index b2bf785..8f6c4e1 100644 (file)
@@ -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
index 63c226e..33122b3 100644 (file)
@@ -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
index cc98c72..f1850c6 100644 (file)
@@ -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
index 02a2246..e7a2d45 100644 (file)
@@ -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