[U-Boot] [PATCH] fsl/usb: Workaround for USB erratum-A005275

Marek Vasut marex at denx.de
Wed Oct 3 21:05:00 UTC 2018


On 10/03/2018 10:21 PM, Chris Packham wrote:
> Workaround makes FS as default mode on all affected socs.
> 
> Add support to check erratum-A005275 validity for an soc. This info is
> required to determine whether a given soc is affected by this erratum.
> Add quirk for this erratum "has_fsl_erratum_a005275" . This quirk is used
> to enable workaround for the errata
> 
> Force FS mode as default by:
>         - making EPS as FS
>         - setting PFSC bit to disable HS chirping
> 
> This workaround can be disabled by mentioning "no_erratum_a005275" in
> hwconfig string
> 
> Signed-off-by: Chris Packham <judge.packham at gmail.com>
[...]

> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index a04f6a31c8e4..71e4ded53100 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -93,6 +93,7 @@ static int ehci_fsl_probe(struct udevice *dev)
>  	struct usb_ehci *ehci = NULL;
>  	struct ehci_hccr *hccr;
>  	struct ehci_hcor *hcor;
> +	struct ehci_ctrl *echi_ctrl = &priv->echi;

Was this ever even compile-tested ? See echi_ctrl vs ehci_ctrl below ...

>  	/*
>  	 * Get the base address for EHCI controller from the device node
> @@ -107,6 +108,8 @@ static int ehci_fsl_probe(struct udevice *dev)
>  	hcor = (struct ehci_hcor *)
>  		((void *)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
>  
> +	ehci_ctrl->has_fsl_erratum_a005275 = has_erratum_a005275();

[...]

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list