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/common/fsl-errata.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/common/fsl-errata.c')
-rw-r--r-- | drivers/usb/common/fsl-errata.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c index 386130d7a1..9eb1d23067 100644 --- a/drivers/usb/common/fsl-errata.c +++ b/drivers/usb/common/fsl-errata.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <hwconfig.h> #include <fsl_errata.h> #include<fsl_usb.h> #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \ @@ -44,6 +45,33 @@ bool has_dual_phy(void) return false; } +bool has_erratum_a005275(void) +{ + u32 svr = get_svr(); + u32 soc = SVR_SOC_VER(svr); + + if (hwconfig("no_erratum_a005275")) + return false; + + switch (soc) { +#ifdef CONFIG_PPC + case SVR_P3041: + case SVR_P2041: + case SVR_P2040: + return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1); + case SVR_P5010: + case SVR_P5020: + case SVR_P5021: + return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0); + case SVR_P5040: + case SVR_P1010: + return IS_SVR_REV(svr, 1, 0); +#endif + } + + return false; +} + bool has_erratum_a006261(void) { u32 svr = get_svr(); |