summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-06-12 19:56:59 +0200
committerMarek Vasut <marex@denx.de>2015-07-22 08:57:53 +0200
commit17da3c0c8cad2a40903c078d178cd663d73ccc7c (patch)
tree3bc3214b5165febe077585d7c5485735d1cfede7
parent01acd6abbdd5a5951f68d08c245550c720ea6ad8 (diff)
downloadu-boot-imx-17da3c0c8cad2a40903c078d178cd663d73ccc7c.zip
u-boot-imx-17da3c0c8cad2a40903c078d178cd663d73ccc7c.tar.gz
u-boot-imx-17da3c0c8cad2a40903c078d178cd663d73ccc7c.tar.bz2
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)
-rw-r--r--README3
-rw-r--r--arch/arm/cpu/armv7/omap-common/boot-common.c2
-rw-r--r--doc/README.android-fastboot4
-rw-r--r--drivers/usb/gadget/Makefile2
-rw-r--r--include/configs/am335x_evm.h1
-rw-r--r--include/configs/bav335x.h1
-rw-r--r--include/configs/dra7xx_evm.h1
-rw-r--r--include/configs/nitrogen6x.h1
-rw-r--r--include/configs/omap3_beagle.h1
9 files changed, 12 insertions, 4 deletions
diff --git a/README b/README
index c13a383..1e04cf8 100644
--- 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:
+ 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
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index bbc6bed..7fc0a56 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -163,7 +163,7 @@ void arch_preboot_os(void)
}
#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");
diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
index c2a2418..92f2897 100644
--- a/doc/README.android-fastboot
+++ b/doc/README.android-fastboot
@@ -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 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
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 46d7d94..4e15323 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -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_CMD_FASTBOOT) += f_fastboot.o
+obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
endif
ifdef CONFIG_USB_ETHER
obj-y += ether.o
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7fd8cf7..abcdfda 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -298,6 +298,7 @@
#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
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index b53c49e..31b75f2 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -455,6 +455,7 @@ DEFAULT_LINUX_BOOT_ENV \
#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
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index b969944..62330bf 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -89,6 +89,7 @@
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
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 231da72..47239b1 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -346,6 +346,7 @@
#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
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 8ebb5bd..59c780e 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -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_USB_FUNCTION_FASTBOOT
#define CONFIG_CMD_FASTBOOT
#define CONFIG_ANDROID_BOOT_IMAGE
#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR