diff options
author | Chris Packham <judge.packham@gmail.com> | 2018-10-04 20:03:53 +1300 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2018-10-29 13:13:05 -0700 |
commit | 4eaf7f525a0874a1eff0f5666004896cc5c89fa3 (patch) | |
tree | 551c1b5d786f0f8fc0182361ad98f591c6a71481 /drivers/usb/host/ehci-fsl.c | |
parent | 454cf76184c65426b68033a23da086e73663f2fc (diff) |
fsl/usb: Workaround for USB erratum-A005275
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@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/usb/host/ehci-fsl.c')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index a04f6a31c8..a8fb2b8ac3 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 *ehci_ctrl = &priv->ehci; /* * 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(); + if (ehci_fsl_init(priv, ehci, hccr, hcor) < 0) return -ENXIO; @@ -145,6 +148,8 @@ U_BOOT_DRIVER(ehci_fsl) = { int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { + struct ehci_ctrl *ehci_ctrl = container_of(hccr, + struct ehci_ctrl, hccr); struct usb_ehci *ehci = NULL; switch (index) { @@ -163,6 +168,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, *hcor = (struct ehci_hcor *)((uint32_t) *hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); + ehci_ctrl->has_fsl_erratum_a005275 = has_erratum_a005275(); + return ehci_fsl_init(index, ehci, *hccr, *hcor); } |