[PATCH 2/2] usb: ehci-mx6: Do not fail when 'reg' is not found

Pierre-Jean Texier texier.pj2 at gmail.com
Sun Jun 20 18:01:29 CEST 2021


Hi Fabio,

Le 20/06/2021 à 17:00, Fabio Estevam a écrit :
> Unlike imx6, on imx7 the USB PHY is described as:
> 
> 	usbphynop1: usbphynop1 {
> 		compatible = "usb-nop-xceiv";
> 		clocks = <&clks IMX7D_USB_PHY1_CLK>;
> 		clock-names = "main_clk";
> 		#phy-cells = <0>;
> 	};
> 	
> which does not have the 'reg' property.
> 
> Do not return an error when the 'reg' property is not found
> for the USB PHY.
> 
> This fixes USB gadget regression on a imx7s-warp board.
> 
> Successfully tested the "ums 0 mmc 0" command on two boards:
> imx7s-warp and imx6dl-pico-pi.
> 
> Signed-off-by: Fabio Estevam <festevam at denx.de>

Thanks for the fix.

Successfully tested on two boards:
  - imx7s-warp,
  - imx7d-pico-pi

Tested-by: Pierre-Jean Texier <texier.pj2 at gmail.com>

> ---
>   drivers/usb/host/ehci-mx6.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
> index 48b5c8b0c53c..c3e4170513ec 100644
> --- a/drivers/usb/host/ehci-mx6.c
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -583,7 +583,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
>   
>   	addr = (void __iomem *)fdtdec_get_addr(blob, phy_off, "reg");
>   	if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
> -		return -EINVAL;
> +		addr = NULL;
>   
>   	priv->phy_addr = addr;
>   
> 

Regards,
-- 
Pierre-Jean Texier


More information about the U-Boot mailing list