From patchwork Sat May 16 17:51:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 473064 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 62BBB140B0D for ; Sun, 17 May 2015 03:51:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C668D4B8F4; Sat, 16 May 2015 19:51:50 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l_2zFqOVN0Og; Sat, 16 May 2015 19:51:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40A6F4B8F7; Sat, 16 May 2015 19:51:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 744524B8E4 for ; Sat, 16 May 2015 19:51:42 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S91hnu-o2VRP for ; Sat, 16 May 2015 19:51:42 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gagarine.paulk.fr (gagarine.paulk.fr [109.190.93.129]) by theia.denx.de (Postfix) with ESMTPS id 0F1F94B8E3 for ; Sat, 16 May 2015 19:51:39 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 65534) id 47F922064B; Sat, 16 May 2015 19:51:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from armstrong.paulk.fr (armstrong.paulk.fr [82.233.88.171]) by gagarine.paulk.fr (Postfix) with ESMTPS id 7E7742047E; Sat, 16 May 2015 19:51:25 +0200 (CEST) Received: from localhost.localdomain (aldrin [192.168.0.128]) by armstrong.paulk.fr (Postfix) with ESMTP id 9C78F377E2; Sat, 16 May 2015 19:51:24 +0200 (CEST) From: Paul Kocialkowski To: u-boot@lists.denx.de Date: Sat, 16 May 2015 19:51:03 +0200 Message-Id: <1431798665-28790-2-git-send-email-contact@paulk.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431798665-28790-1-git-send-email-contact@paulk.fr> References: <1431798665-28790-1-git-send-email-contact@paulk.fr> Cc: Tom Rini , Dileep Katta Subject: [U-Boot] [PATCH 2/4] usb: Fastboot function config for better consistency with other functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Acked-by: Lukasz Majewski --- 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