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) || IS_SVR_REV(svr, 2, 1);
58 return IS_SVR_REV(svr, 1, 0) ||
59 IS_SVR_REV(svr, 1, 1) ||
60 IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 2, 1);
64 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
68 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
70 return IS_SVR_REV(svr, 1, 0);
73 return IS_SVR_REV(svr, 1, 0);
75 return IS_SVR_REV(svr, 1, 0);
82 bool has_erratum_a007075(void)
85 u32 soc = SVR_SOC_VER(svr);
91 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
93 return IS_SVR_REV(svr, 1, 0);
95 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
101 bool has_erratum_a007798(void)
104 return SVR_SOC_VER(get_svr()) == SVR_T4240 &&
105 IS_SVR_REV(get_svr(), 2, 0);
110 bool has_erratum_a007792(void)
113 u32 soc = SVR_SOC_VER(svr);
120 return IS_SVR_REV(svr, 2, 0);
123 return IS_SVR_REV(svr, 1, 0);
130 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
136 bool has_erratum_a005697(void)
139 u32 soc = SVR_SOC_VER(svr);
145 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
151 bool has_erratum_a004477(void)
154 u32 soc = SVR_SOC_VER(svr);
159 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
163 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
165 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0) ||
166 IS_SVR_REV(svr, 2, 1);
169 return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 2, 0);
171 return IS_SVR_REV(svr, 2, 0) || IS_SVR_REV(svr, 3, 0);
178 bool has_erratum_a008751(void)
181 u32 soc = SVR_SOC_VER(svr);
187 return IS_SVR_REV(svr, 1, 0);