[PATCH 13/13] usb: ehci-mx6: Improve the bind function

Marek Vasut marex at denx.de
Wed Sep 16 15:46:45 CEST 2020


On 9/16/20 2:57 PM, peng.fan at nxp.com wrote:
[...]
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -735,13 +735,16 @@ static int ehci_usb_bind(struct udevice *dev)
>  	 * the driver is fully converted to DT probing.
>  	 */
>  	u32 controller_spacing;
> -	if (IS_ENABLED(CONFIG_MX6))
> -		controller_spacing = 0x200;
> -	else
> -		controller_spacing = 0x10000;
> -	fdt_addr_t addr = devfdt_get_addr_index(dev, 0);
>  
> -	dev->req_seq = (addr - USB_BASE_ADDR) / controller_spacing;
> +	if (dev->req_seq == -1) {
> +		if (IS_ENABLED(CONFIG_MX6))
> +			controller_spacing = 0x200;
> +		else
> +			controller_spacing = 0x10000;
> +		fdt_addr_t addr = devfdt_get_addr_index(dev, 0);

Can we get rid of the whole req_seq stuff ?
It is a workaround, see
501547cec1 ("usb: ehci-mx6: Fix bus enumeration for DM case")


More information about the U-Boot mailing list