2 * Freescale USB Controller
4 * Copyright 2013 Freescale Semiconductor, Inc.
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <fsl_errata.h>
12 #if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
14 #include <asm/arch/clock.h>
17 /* USB Erratum Checking code */
18 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
19 bool has_dual_phy(void)
22 u32 soc = SVR_SOC_VER(svr);
30 return IS_SVR_REV(svr, 1, 0);
37 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
41 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
48 bool has_erratum_a006261(void)
51 u32 soc = SVR_SOC_VER(svr);
56 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
59 return IS_SVR_REV(svr, 1, 0) ||
60 IS_SVR_REV(svr, 1, 1) ||
61 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
63 return IS_SVR_REV(svr, 1, 0) ||
64 IS_SVR_REV(svr, 1, 1) ||
65 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
69 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
71 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
73 return IS_SVR_REV(svr, 1, 0) ||
74 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
81 bool has_erratum_a007075(void)
84 u32 soc = SVR_SOC_VER(svr);
90 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
92 return IS_SVR_REV(svr, 1, 0);
94 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
100 bool has_erratum_a007798(void)
103 return SVR_SOC_VER(get_svr()) == SVR_T4240 &&
104 IS_SVR_REV(get_svr(), 2, 0);
109 bool has_erratum_a007792(void)
112 u32 soc = SVR_SOC_VER(svr);
119 return IS_SVR_REV(svr, 2, 0);
122 return IS_SVR_REV(svr, 1, 0);
129 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
135 bool has_erratum_a005697(void)
138 u32 soc = SVR_SOC_VER(svr);
144 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
148 return IS_SVR_REV(svr, 1, 0);
154 bool has_erratum_a004477(void)
157 u32 soc = SVR_SOC_VER(svr);
162 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
166 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
168 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0) ||
169 IS_SVR_REV(svr, 2, 1);
172 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
174 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
181 bool has_erratum_a008751(void)
184 u32 soc = SVR_SOC_VER(svr);
190 return IS_SVR_REV(svr, 1, 0);
196 bool has_erratum_a010151(void)
199 u32 soc = SVR_SOC_VER(svr);
211 return IS_SVR_REV(svr, 1, 0);
213 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
215 #ifdef CONFIG_ARCH_LS1021A
219 case SOC_VER_SLS1020:
220 return IS_SVR_REV(svr, 2, 0);