Commit 17da3c0c8cad2a40903c078d178cd663d73ccc7c

Authored by Paul Kocialkowski
Committed by Marek Vasut
1 parent 01acd6abbd

usb: Fastboot function config for better consistency with other functions

USB download gadget functions such as thor and dfu have a separate config option
for the USB gadget part of the code, independent from the command part.
This switches the fastboot USB gadget to the same scheme, for better
consistency.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

Showing 9 changed files with 12 additions and 4 deletions Side-by-side Diff

... ... @@ -1716,6 +1716,9 @@
1716 1716 sending again an USB request to the device.
1717 1717  
1718 1718 - USB Device Android Fastboot support:
  1719 + CONFIG_USB_FUNCTION_FASTBOOT
  1720 + This enables the USB part of the fastboot gadget
  1721 +
1719 1722 CONFIG_CMD_FASTBOOT
1720 1723 This enables the command "fastboot" which enables the Android
1721 1724 fastboot mode for the platform's USB device. Fastboot is a USB
arch/arm/cpu/armv7/omap-common/boot-common.c
... ... @@ -163,7 +163,7 @@
163 163 }
164 164 #endif
165 165  
166   -#if defined(CONFIG_CMD_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
  166 +#if defined(CONFIG_USB_FUNCTION_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
167 167 int fb_set_reboot_flag(void)
168 168 {
169 169 printf("Setting reboot to fastboot flag ...\n");
doc/README.android-fastboot
... ... @@ -42,8 +42,8 @@
42 42 the fastboot client. The list of vendor IDs supported can be found in the
43 43 fastboot client source code (fastboot.c) mentioned above.
44 44  
45   -The fastboot function is enabled by defining CONFIG_CMD_FASTBOOT and
46   -CONFIG_ANDROID_BOOT_IMAGE.
  45 +The fastboot function is enabled by defining CONFIG_USB_FUNCTION_FASTBOOT,
  46 +CONFIG_CMD_FASTBOOT and CONFIG_ANDROID_BOOT_IMAGE.
47 47  
48 48 The fastboot protocol requires a large memory buffer for downloads. This
49 49 buffer should be as large as possible for a platform. The location of the
drivers/usb/gadget/Makefile
... ... @@ -19,7 +19,7 @@
19 19 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
20 20 obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
21 21 obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
22   -obj-$(CONFIG_CMD_FASTBOOT) += f_fastboot.o
  22 +obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
23 23 endif
24 24 ifdef CONFIG_USB_ETHER
25 25 obj-y += ether.o
include/configs/am335x_evm.h
... ... @@ -298,6 +298,7 @@
298 298  
299 299 #ifndef CONFIG_SPL_USBETH_SUPPORT
300 300 /* Fastboot */
  301 +#define CONFIG_USB_FUNCTION_FASTBOOT
301 302 #define CONFIG_CMD_FASTBOOT
302 303 #define CONFIG_ANDROID_BOOT_IMAGE
303 304 #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
include/configs/bav335x.h
... ... @@ -455,6 +455,7 @@
455 455  
456 456 #ifndef CONFIG_SPL_USBETH_SUPPORT
457 457 /* Fastboot */
  458 +#define CONFIG_USB_FUNCTION_FASTBOOT
458 459 #define CONFIG_CMD_FASTBOOT
459 460 #define CONFIG_ANDROID_BOOT_IMAGE
460 461 #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
include/configs/dra7xx_evm.h
... ... @@ -89,6 +89,7 @@
89 89 DFU_ALT_INFO_RAM
90 90  
91 91 /* Fastboot */
  92 +#define CONFIG_USB_FUNCTION_FASTBOOT
92 93 #define CONFIG_CMD_FASTBOOT
93 94 #define CONFIG_ANDROID_BOOT_IMAGE
94 95 #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
include/configs/nitrogen6x.h
... ... @@ -346,6 +346,7 @@
346 346 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
347 347 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
348 348  
  349 +#define CONFIG_USB_FUNCTION_FASTBOOT
349 350 #define CONFIG_CMD_FASTBOOT
350 351 #define CONFIG_ANDROID_BOOT_IMAGE
351 352 #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
include/configs/omap3_beagle.h
... ... @@ -72,6 +72,7 @@
72 72 #define CONFIG_G_DNL_VENDOR_NUM 0x0451
73 73 #define CONFIG_G_DNL_PRODUCT_NUM 0xd022
74 74 #define CONFIG_G_DNL_MANUFACTURER "TI"
  75 +#define CONFIG_USB_FUNCTION_FASTBOOT
75 76 #define CONFIG_CMD_FASTBOOT
76 77 #define CONFIG_ANDROID_BOOT_IMAGE
77 78 #define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR