From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] usb: Fastboot function config for better consistency with other functions
Date: Mon, 18 May 2015 15:02:20 +0200 [thread overview]
Message-ID: <20150518150220.137998f0@amdc2363> (raw)
In-Reply-To: <1431798665-28790-2-git-send-email-contact@paulk.fr>
Hi Paul,
> 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>
> ---
> README | 3 +++
> arch/arm/cpu/armv7/omap-common/boot-common.c | 2 +-
> doc/README.android-fastboot | 4 ++--
> drivers/usb/gadget/Makefile | 2 +-
> include/configs/am335x_evm.h | 1 +
> include/configs/bav335x.h | 1 +
> include/configs/dra7xx_evm.h | 1 +
> include/configs/nitrogen6x.h | 1 +
> include/configs/omap3_beagle.h | 1 +
> 9 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/README b/README
> index ba3fa49..470210a 100644
> --- a/README
> +++ b/README
> @@ -1717,6 +1717,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 b94e4b5..8aa3fd7 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 7ce568b..99e3a00 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 c5ce741..0826235 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -85,6 +85,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 53ee997..3ba7476 100644
> --- a/include/configs/nitrogen6x.h
> +++ b/include/configs/nitrogen6x.h
> @@ -416,6 +416,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 1e7a158..293a2d7 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
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
I will test this patch on my devices and then pull it to u-boot-dfu
tree.
Thanks for your work!
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2015-05-18 13:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-16 17:51 [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming Paul Kocialkowski
2015-05-16 17:51 ` [U-Boot] [PATCH 2/4] usb: Fastboot function config for better consistency with other functions Paul Kocialkowski
2015-05-18 13:02 ` Lukasz Majewski [this message]
2015-05-16 17:51 ` [U-Boot] [PATCH 3/4] usb: board_usb_init and board_usb_cleanup calls in the fastboot command Paul Kocialkowski
2015-05-18 13:02 ` Lukasz Majewski
2015-05-16 17:51 ` [U-Boot] [PATCH 4/4] usb: gadget: Weak board_usb_init/cleanup definitions in USB download gadget code Paul Kocialkowski
2015-05-18 13:02 ` Lukasz Majewski
2015-05-18 13:01 ` [U-Boot] [PATCH 1/4] usb: USB download gadget and functions config options coherent naming Lukasz Majewski
2015-06-12 10:42 ` Paul Kocialkowski
2015-06-12 14:10 ` Lukasz Majewski
2015-06-12 17:59 ` Paul Kocialkowski
2015-06-12 20:06 ` Lukasz Majewski
2015-06-12 20:14 ` Paul Kocialkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150518150220.137998f0@amdc2363 \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox