[U-Boot] [PATCH] ums: respect CONFIG_USB_CABLE_CHECK

Marek Vasut marex at denx.de
Thu May 1 07:21:27 CEST 2014


On Wednesday, April 30, 2014 at 11:10:35 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren at nvidia.com>
> 
> Not all boards support usb_cable_connected(). CONFIG_USB_CABLE_CHECK is
> used elsewhere to indicate whether a board does support that function.
> Enhance cmd_usb_mass_storage.c to honor that config variable.
> 
> Cc: Przemyslaw Marczak <p.marczak at samsung.com>
> Cc: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  common/cmd_usb_mass_storage.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
> index 5f557d5f857d..2f69a53acc67 100644
> --- a/common/cmd_usb_mass_storage.c
> +++ b/common/cmd_usb_mass_storage.c
> @@ -42,6 +42,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
> 
>  	g_dnl_register("ums");
> 
> +#ifdef CONFIG_USB_CABLE_CHECK
>  	/* Timeout unit: seconds */
>  	int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT;
> 
> @@ -65,6 +66,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
>  		}
>  		puts("\r\n");
>  	}
> +#endif
> 
>  	while (1) {
>  		usb_gadget_handle_interrupts();

Please look at:
[PATCH v5 03/12] usb: dfu: fix boards wo USB cable detection

Does this work for you instead ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list