diff mbox

[2/4] ti_omap5_common: Respect USB controller number in fastboot

Message ID 20161020155831.4212-3-semen.protsenko@linaro.org
State New
Headers show

Commit Message

Sam Protsenko Oct. 20, 2016, 3:58 p.m. UTC
On "fastboot reboot-bootloader" we check "dofastboot" variable and do
"fastboot 0" command in U-Boot if it's 1. But there are boards which have
USB controller number other than 0, so it should be respected when
performing "fastboot" command.

This patch reuses CONFIG_FASTBOOT_USB_DEV option toprovide correct USB
controller number to "fastboot" command.

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

---
 include/configs/ti_omap5_common.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.9.3

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

Comments

Tom Rini Oct. 21, 2016, 11:19 a.m. UTC | #1
On Thu, Oct 20, 2016 at 06:58:29PM +0300, Sam Protsenko wrote:

> On "fastboot reboot-bootloader" we check "dofastboot" variable and do

> "fastboot 0" command in U-Boot if it's 1. But there are boards which have

> USB controller number other than 0, so it should be respected when

> performing "fastboot" command.

> 

> This patch reuses CONFIG_FASTBOOT_USB_DEV option toprovide correct USB

> controller number to "fastboot" command.

> 

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

> ---

>  include/configs/ti_omap5_common.h | 6 +++++-

>  1 file changed, 5 insertions(+), 1 deletion(-)

> 

> diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h

> index 29b7d96..144a880 100644

> --- a/include/configs/ti_omap5_common.h

> +++ b/include/configs/ti_omap5_common.h

> @@ -110,11 +110,15 @@

>  	DFUARGS \

>  	NETARGS \

>  

> +#ifndef CONFIG_FASTBOOT_USB_DEV

> +#define CONFIG_FASTBOOT_USB_DEV 0

> +#endif


We don't need this hunk, it will always be defined now.

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Sam Protsenko Oct. 24, 2016, 3:42 p.m. UTC | #2
On Fri, Oct 21, 2016 at 2:19 PM, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Oct 20, 2016 at 06:58:29PM +0300, Sam Protsenko wrote:

>

>> On "fastboot reboot-bootloader" we check "dofastboot" variable and do

>> "fastboot 0" command in U-Boot if it's 1. But there are boards which have

>> USB controller number other than 0, so it should be respected when

>> performing "fastboot" command.

>>

>> This patch reuses CONFIG_FASTBOOT_USB_DEV option toprovide correct USB

>> controller number to "fastboot" command.

>>

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

>> ---

>>  include/configs/ti_omap5_common.h | 6 +++++-

>>  1 file changed, 5 insertions(+), 1 deletion(-)

>>

>> diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h

>> index 29b7d96..144a880 100644

>> --- a/include/configs/ti_omap5_common.h

>> +++ b/include/configs/ti_omap5_common.h

>> @@ -110,11 +110,15 @@

>>       DFUARGS \

>>       NETARGS \

>>

>> +#ifndef CONFIG_FASTBOOT_USB_DEV

>> +#define CONFIG_FASTBOOT_USB_DEV 0

>> +#endif

>

> We don't need this hunk, it will always be defined now.

>


Tom,

I fixed that and resent the whole patchset. Please reexamine v2.

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/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 29b7d96..144a880 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -110,11 +110,15 @@ 
 	DFUARGS \
 	NETARGS \
 
+#ifndef CONFIG_FASTBOOT_USB_DEV
+#define CONFIG_FASTBOOT_USB_DEV 0
+#endif
 #define CONFIG_BOOTCOMMAND \
 	"if test ${dofastboot} -eq 1; then " \
 		"echo Boot fastboot requested, resetting dofastboot ...;" \
 		"setenv dofastboot 0; saveenv;" \
-		"echo Booting into fastboot ...; fastboot 0;" \
+		"echo Booting into fastboot ...; " \
+		"fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
 	"fi;" \
 	"run findfdt; " \
 	"run envboot; " \