diff options
author | Sriram Dash <sriram.dash@nxp.com> | 2016-06-13 09:58:36 +0530 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2016-06-13 15:16:46 +0200 |
commit | ef53b8c4ce2919d6685d2dc0c51a91a180433ff0 (patch) | |
tree | a8e74bad3688faf65dcdee23c5ea28c32abd00df /drivers/usb/host | |
parent | 32fbd46f38ed183ae92aabc0a2abd7847bc3363e (diff) | |
download | u-boot-imx-ef53b8c4ce2919d6685d2dc0c51a91a180433ff0.zip u-boot-imx-ef53b8c4ce2919d6685d2dc0c51a91a180433ff0.tar.gz u-boot-imx-ef53b8c4ce2919d6685d2dc0c51a91a180433ff0.tar.bz2 |
usb: xhci: fsl: Add workaround for USB erratum A008751
This patch is doing the following:
1. Implementing the errata for LS2080.
2. Adding fixup for fdt for LS2080.
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-fsl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c index 05f09d7..c12a189 100644 --- a/drivers/usb/host/xhci-fsl.c +++ b/drivers/usb/host/xhci-fsl.c @@ -15,6 +15,8 @@ #include <linux/usb/xhci-fsl.h> #include <linux/usb/dwc3.h> #include "xhci.h" +#include <fsl_errata.h> +#include <fsl_usb.h> /* Declare global data pointer */ DECLARE_GLOBAL_DATA_PTR; @@ -27,6 +29,26 @@ __weak int __board_usb_init(int index, enum usb_init_type init) return 0; } +static int erratum_a008751(void) +{ +#if defined(CONFIG_TARGET_LS2080AQDS) || defined(CONFIG_TARGET_LS2080ARDB) + u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE; + writel(SCFG_USB3PRM1CR_INIT, scfg + SCFG_USB3PRM1CR / 4); + return 0; +#endif + return 1; +} + +static void fsl_apply_xhci_errata(void) +{ + int ret; + if (has_erratum_a008751()) { + ret = erratum_a008751(); + if (ret != 0) + puts("Failed to apply erratum a008751\n"); + } +} + static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci) { int ret = 0; @@ -69,6 +91,8 @@ int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor) return ret; } + fsl_apply_xhci_errata(); + ret = fsl_xhci_core_init(ctx); if (ret < 0) { puts("Failed to initialize xhci\n"); |