2 * Freescale USB Controller
4 * Copyright 2013 Freescale Semiconductor, Inc.
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <fsl_errata.h>
13 /* USB Erratum Checking code */
14 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
15 bool has_dual_phy(void)
18 u32 soc = SVR_SOC_VER(svr);
26 return IS_SVR_REV(svr, 1, 0);
33 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
37 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
44 bool has_erratum_a006261(void)
47 u32 soc = SVR_SOC_VER(svr);
52 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
55 return IS_SVR_REV(svr, 1, 0) ||
56 IS_SVR_REV(svr, 1, 1) ||
57 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
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);
65 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
67 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
69 return IS_SVR_REV(svr, 1, 0) ||
70 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
77 bool has_erratum_a007075(void)
80 u32 soc = SVR_SOC_VER(svr);
86 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
88 return IS_SVR_REV(svr, 1, 0);
90 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
96 bool has_erratum_a007798(void)
99 return SVR_SOC_VER(get_svr()) == SVR_T4240 &&
100 IS_SVR_REV(get_svr(), 2, 0);
105 bool has_erratum_a007792(void)
108 u32 soc = SVR_SOC_VER(svr);
115 return IS_SVR_REV(svr, 2, 0);
118 return IS_SVR_REV(svr, 1, 0);
125 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
131 bool has_erratum_a005697(void)
134 u32 soc = SVR_SOC_VER(svr);
140 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
144 return IS_SVR_REV(svr, 1, 0);
150 bool has_erratum_a004477(void)
153 u32 soc = SVR_SOC_VER(svr);
158 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
162 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
164 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0) ||
165 IS_SVR_REV(svr, 2, 1);
168 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
170 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
177 bool has_erratum_a008751(void)
180 u32 soc = SVR_SOC_VER(svr);
186 return IS_SVR_REV(svr, 1, 0);
192 bool has_erratum_a010151(void)
195 u32 soc = SVR_SOC_VER(svr);
203 return IS_SVR_REV(svr, 1, 0);
205 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
207 #ifdef CONFIG_ARCH_LS1021A
211 case SOC_VER_SLS1020:
212 return IS_SVR_REV(svr, 2, 0);