diff mbox

[v2,1/4] fastboot: Add CONFIG_FASTBOOT_USB_DEV option

Message ID 20161024154113.19607-2-semen.protsenko@linaro.org
State Accepted
Commit 9af5ba878a8cca5af6e03b701367cf28bef39d6d
Headers show

Commit Message

Sam Protsenko Oct. 24, 2016, 3:41 p.m. UTC
Some boards (like AM57x EVM) has USB OTG controller other than 0. So in
order to use correct controller number in compiled environment we should
define CONFIG_FASTBOOT_USB_DEV option.

For example, when doing "fastboot reboot-bootloader" we want to enter
fastboot mode automatically. But to do so we need to provide controller
number to "fastboot" command. If this procedure is defined in some config
which is common to bunch of boards, and boards have different USB
controller numbers, we can't just hardcode "fastboot 0" in the
environment. We need to use configurable option, which this patch adds.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

---
Changes in v2: None

 cmd/fastboot/Kconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.9.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Tom Rini Oct. 24, 2016, 4:12 p.m. UTC | #1
On Mon, Oct 24, 2016 at 06:41:10PM +0300, Sam Protsenko wrote:

> Some boards (like AM57x EVM) has USB OTG controller other than 0. So in

> order to use correct controller number in compiled environment we should

> define CONFIG_FASTBOOT_USB_DEV option.

> 

> For example, when doing "fastboot reboot-bootloader" we want to enter

> fastboot mode automatically. But to do so we need to provide controller

> number to "fastboot" command. If this procedure is defined in some config

> which is common to bunch of boards, and boards have different USB

> controller numbers, we can't just hardcode "fastboot 0" in the

> environment. We need to use configurable option, which this patch adds.

> 

> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>


Reviewed-by: Tom Rini <trini@konsulko.com>


-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Tom Rini Nov. 22, 2016, 2:43 a.m. UTC | #2
On Mon, Oct 24, 2016 at 06:41:10PM +0300, Semen Protsenko wrote:

> Some boards (like AM57x EVM) has USB OTG controller other than 0. So in

> order to use correct controller number in compiled environment we should

> define CONFIG_FASTBOOT_USB_DEV option.

> 

> For example, when doing "fastboot reboot-bootloader" we want to enter

> fastboot mode automatically. But to do so we need to provide controller

> number to "fastboot" command. If this procedure is defined in some config

> which is common to bunch of boards, and boards have different USB

> controller numbers, we can't just hardcode "fastboot 0" in the

> environment. We need to use configurable option, which this patch adds.

> 

> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

> Reviewed-by: Tom Rini <trini@konsulko.com>


Applied to u-boot/master, thanks!

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
index 5d2facc..d555d0a 100644
--- a/cmd/fastboot/Kconfig
+++ b/cmd/fastboot/Kconfig
@@ -41,6 +41,14 @@  config FASTBOOT_BUF_SIZE
 	  downloads. This buffer should be as large as possible for a
 	  platform. Define this to the size available RAM for fastboot.
 
+config FASTBOOT_USB_DEV
+	int "USB controller number"
+	default 0
+	help
+	  Some boards have USB OTG controller other than 0. Define this
+	  option so it can be used in compiled environment (e.g. in
+	  CONFIG_BOOTCOMMAND).
+
 config FASTBOOT_FLASH
 	bool "Enable FASTBOOT FLASH command"
 	help