[PATCH 06/13] usb: ehci-mx6: fix controller index for imx8m and imx8

Marek Vasut marex at denx.de
Wed Sep 16 15:41:40 CEST 2020


On 9/16/20 2:56 PM, peng.fan at nxp.com wrote:
[...]
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -665,7 +665,11 @@ static int ehci_usb_bind(struct udevice *dev)
>  	 * With these changes in place, the ad-hoc indexing goes away and
>  	 * the driver is fully converted to DT probing.
>  	 */
> -	u32 controller_spacing = is_mx7() ? 0x10000 : 0x200;
> +	u32 controller_spacing;
> +	if (IS_ENABLED(CONFIG_MX6))
> +		controller_spacing = 0x200;
> +	else
> +		controller_spacing = 0x10000;

I suspect this changes the behavior from runtime detection to
compile-time detection of the SoC ?

I would much prefer if we could extract the controller-PHY binding from
DT instead of this workaround, finally. I recall that was the reason why
this stuff above was added originally.


More information about the U-Boot mailing list