]> git.sur5r.net Git - u-boot/commitdiff
usb: Fastboot function config for better consistency with other functions
authorPaul Kocialkowski <contact@paulk.fr>
Fri, 12 Jun 2015 17:56:59 +0000 (19:56 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 22 Jul 2015 06:57:53 +0000 (08:57 +0200)
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)

README
arch/arm/cpu/armv7/omap-common/boot-common.c
doc/README.android-fastboot
drivers/usb/gadget/Makefile
include/configs/am335x_evm.h
include/configs/bav335x.h
include/configs/dra7xx_evm.h
include/configs/nitrogen6x.h
include/configs/omap3_beagle.h

diff --git a/README b/README
index c13a38339bae5531787f47b987f36e4ec378bbd4..1e04cf8dcc768ea8abb308c682fddaa62923b6f8 100644 (file)
--- a/README
+++ b/README
@@ -1716,6 +1716,9 @@ The following options need to be configured:
                sending again an USB request to the device.
 
 - USB Device Android Fastboot support:
                sending again an USB request to the device.
 
 - USB Device Android Fastboot support:
+               CONFIG_USB_FUNCTION_FASTBOOT
+               This enables the USB part of the fastboot gadget
+
                CONFIG_CMD_FASTBOOT
                This enables the command "fastboot" which enables the Android
                fastboot mode for the platform's USB device. Fastboot is a USB
                CONFIG_CMD_FASTBOOT
                This enables the command "fastboot" which enables the Android
                fastboot mode for the platform's USB device. Fastboot is a USB
index bbc6bed7cac9bc765553093d3d6655afffbc15c7..7fc0a561b750dc0f3534dfe3439ab48ca4cda76b 100644 (file)
@@ -163,7 +163,7 @@ void arch_preboot_os(void)
 }
 #endif
 
 }
 #endif
 
-#if defined(CONFIG_CMD_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
+#if defined(CONFIG_USB_FUNCTION_FASTBOOT) && !defined(CONFIG_ENV_IS_NOWHERE)
 int fb_set_reboot_flag(void)
 {
        printf("Setting reboot to fastboot flag ...\n");
 int fb_set_reboot_flag(void)
 {
        printf("Setting reboot to fastboot flag ...\n");
index c2a2418a0fa2d8a9a1c9338ac96596b91bbd0e3a..92f28979998a04034ffb443cf293a9cc225726b0 100644 (file)
@@ -42,8 +42,8 @@ NOTE: The CONFIG_G_DNL_VENDOR_NUM must be one of the numbers supported by
 the fastboot client. The list of vendor IDs supported can be found in the
 fastboot client source code (fastboot.c) mentioned above.
 
 the fastboot client. The list of vendor IDs supported can be found in the
 fastboot client source code (fastboot.c) mentioned above.
 
-The fastboot function is enabled by defining CONFIG_CMD_FASTBOOT and
-CONFIG_ANDROID_BOOT_IMAGE.
+The fastboot function is enabled by defining CONFIG_USB_FUNCTION_FASTBOOT,
+CONFIG_CMD_FASTBOOT and CONFIG_ANDROID_BOOT_IMAGE.
 
 The fastboot protocol requires a large memory buffer for downloads. This
 buffer should be as large as possible for a platform. The location of the
 
 The fastboot protocol requires a large memory buffer for downloads. This
 buffer should be as large as possible for a platform. The location of the
index 46d7d945dd483bbcca79e8c0418f2dfee3d165b9..4e15323131c0ed1e0a113c983a881fd5cc0479b4 100644 (file)
@@ -19,7 +19,7 @@ obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
 obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
 obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
 obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
 obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
-obj-$(CONFIG_CMD_FASTBOOT) += f_fastboot.o
+obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
 endif
 ifdef CONFIG_USB_ETHER
 obj-y += ether.o
 endif
 ifdef CONFIG_USB_ETHER
 obj-y += ether.o
index 7fd8cf7d8f2c81b479eb90556b897de44cc290fd..abcdfda6acd9dac2ae4acef60d6f378828024da2 100644 (file)
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
index b53c49e5e4b68c8f1045fa17b23b65e672c3a655..31b75f216ebdb40c4b695c4b4a1b345434dca500 100644 (file)
@@ -455,6 +455,7 @@ DEFAULT_LINUX_BOOT_ENV \
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
 
 #ifndef CONFIG_SPL_USBETH_SUPPORT
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
index b9699442fb56d7a04a77fddfec831fec3f911eee..62330bf6e4cb3e3493adbce955c6d7d56338ff85 100644 (file)
@@ -89,6 +89,7 @@
        DFU_ALT_INFO_RAM
 
 /* Fastboot */
        DFU_ALT_INFO_RAM
 
 /* Fastboot */
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR    CONFIG_SYS_LOAD_ADDR
index 231da72c10f6998edd617894ca9cbf8c2512def6..47239b1016f94b48d9b55690b626937e846794e5 100644 (file)
 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
 
 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
 
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
index 8ebb5bd2a3d50a6ba59400899cd4c0c632f000cd..59c780ed017a900f3886405063a7c588f8fb505f 100644 (file)
@@ -72,6 +72,7 @@
 #define CONFIG_G_DNL_VENDOR_NUM                0x0451
 #define CONFIG_G_DNL_PRODUCT_NUM       0xd022
 #define CONFIG_G_DNL_MANUFACTURER      "TI"
 #define CONFIG_G_DNL_VENDOR_NUM                0x0451
 #define CONFIG_G_DNL_PRODUCT_NUM       0xd022
 #define CONFIG_G_DNL_MANUFACTURER      "TI"
+#define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR