Commit ee909cf54f3db7be1318b0253c96bd103f614b6c

Authored by Luo Ji
1 parent 263252cd22

MA-11601 [Android] Use default usb controller in fastboot for imx8qm/imx8qxp

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>

Showing 5 changed files with 8 additions and 1 deletions Side-by-side Diff

... ... @@ -21,9 +21,12 @@
21 21  
22 22 if (argc < 2)
23 23 return CMD_RET_USAGE;
24   -
  24 +#ifdef CONFIG_FASTBOOT_USB_DEV
  25 + controller_index = CONFIG_FASTBOOT_USB_DEV;
  26 +#else
25 27 usb_controller = argv[1];
26 28 controller_index = simple_strtoul(usb_controller, NULL, 0);
  29 +#endif
27 30  
28 31 ret = board_usb_init(controller_index, USB_INIT_DEVICE);
29 32 if (ret) {
include/configs/imx8qm_arm2_android.h
... ... @@ -36,6 +36,7 @@
36 36 #define CONFIG_FASTBOOT_FLASH
37 37  
38 38 #define CONFIG_FSL_FASTBOOT
  39 +#define CONFIG_FASTBOOT_USB_DEV 1
39 40 #define CONFIG_ANDROID_RECOVERY
40 41  
41 42 #if defined CONFIG_SYS_BOOT_SATA
include/configs/imx8qm_mek_android.h
... ... @@ -42,6 +42,7 @@
42 42 #define CONFIG_FASTBOOT_FLASH
43 43  
44 44 #define CONFIG_FSL_FASTBOOT
  45 +#define CONFIG_FASTBOOT_USB_DEV 1
45 46 #define CONFIG_ANDROID_RECOVERY
46 47  
47 48 #if defined CONFIG_SYS_BOOT_SATA
include/configs/imx8qxp_arm2_android.h
... ... @@ -36,6 +36,7 @@
36 36 #endif
37 37  
38 38 #define CONFIG_FSL_FASTBOOT
  39 +#define CONFIG_FASTBOOT_USB_DEV 1
39 40 #define CONFIG_ANDROID_RECOVERY
40 41  
41 42 #if defined CONFIG_SYS_BOOT_SATA
include/configs/imx8qxp_mek_android.h
... ... @@ -38,6 +38,7 @@
38 38 #define CONFIG_FASTBOOT_FLASH
39 39  
40 40 #define CONFIG_FSL_FASTBOOT
  41 +#define CONFIG_FASTBOOT_USB_DEV 1
41 42 #define CONFIG_ANDROID_RECOVERY
42 43  
43 44 #if defined CONFIG_SYS_BOOT_SATA