[U-Boot] [PATCH v2 11/18] usb: dwc3-generic: if no max speed is specified in DT, assume super speed

Marek Vasut marex at denx.de
Mon May 13 17:25:56 UTC 2019


On 5/13/19 4:30 PM, Jean-Jacques Hiblot wrote:
> There is no need to fail if the maximum speed is not specified.
> If the speed is not specified, do the same as linux and assume super speed.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/usb/dwc3/dwc3-generic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 4924d07553..3d008496f3 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -89,8 +89,8 @@ static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
>  
>  	plat->maximum_speed = usb_get_maximum_speed(node);
>  	if (plat->maximum_speed == USB_SPEED_UNKNOWN) {
> -		pr_err("Invalid usb maximum speed\n");
> -		return -ENODEV;
> +		pr_info("no usb maximum speed specified. use super speed\n");

Nit: s/no usb/No USB/;s/use/Using/

> +		plat->maximum_speed = USB_SPEED_SUPER;
>  	}
>  
>  	plat->dr_mode = usb_get_dr_mode(node);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list