183d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
279ee3448SKumar Gala /*
3d621da00SJerry Huang  * Copyright 2010-2011 Freescale Semiconductor, Inc.
479ee3448SKumar Gala  */
579ee3448SKumar Gala 
679ee3448SKumar Gala #include <common.h>
779ee3448SKumar Gala #include <command.h>
879ee3448SKumar Gala #include <linux/compiler.h>
9a07bdad7SShengzhou Liu #include <fsl_errata.h>
1079ee3448SKumar Gala #include <asm/processor.h>
11c26c80a1SNikhil Badola #include <fsl_usb.h>
12d607b968STimur Tabi #include "fsl_corenet_serdes.h"
1379ee3448SKumar Gala 
140118033bSTimur Tabi #ifdef CONFIG_SYS_FSL_ERRATUM_A004849
150118033bSTimur Tabi /*
160118033bSTimur Tabi  * This work-around is implemented in PBI, so just check to see if the
170118033bSTimur Tabi  * work-around was actually applied.  To do this, we check for specific data
180118033bSTimur Tabi  * at specific addresses in DCSR.
190118033bSTimur Tabi  *
200118033bSTimur Tabi  * Array offsets[] contains a list of offsets within DCSR.  According to the
210118033bSTimur Tabi  * erratum document, the value at each offset should be 2.
220118033bSTimur Tabi  */
check_erratum_a4849(uint32_t svr)230118033bSTimur Tabi static void check_erratum_a4849(uint32_t svr)
240118033bSTimur Tabi {
250118033bSTimur Tabi 	void __iomem *dcsr = (void *)CONFIG_SYS_DCSRBAR + 0xb0000;
260118033bSTimur Tabi 	unsigned int i;
270118033bSTimur Tabi 
285e5fdd2dSYork Sun #if defined(CONFIG_ARCH_P2041) || defined(CONFIG_ARCH_P3041)
290118033bSTimur Tabi 	static const uint8_t offsets[] = {
300118033bSTimur Tabi 		0x50, 0x54, 0x58, 0x90, 0x94, 0x98
310118033bSTimur Tabi 	};
320118033bSTimur Tabi #endif
33e71372cbSYork Sun #ifdef CONFIG_ARCH_P4080
340118033bSTimur Tabi 	static const uint8_t offsets[] = {
350118033bSTimur Tabi 		0x60, 0x64, 0x68, 0x6c, 0xa0, 0xa4, 0xa8, 0xac
360118033bSTimur Tabi 	};
370118033bSTimur Tabi #endif
380118033bSTimur Tabi 	uint32_t x108; /* The value that should be at offset 0x108 */
390118033bSTimur Tabi 
400118033bSTimur Tabi 	for (i = 0; i < ARRAY_SIZE(offsets); i++) {
410118033bSTimur Tabi 		if (in_be32(dcsr + offsets[i]) != 2) {
420118033bSTimur Tabi 			printf("Work-around for Erratum A004849 is not enabled\n");
430118033bSTimur Tabi 			return;
440118033bSTimur Tabi 		}
450118033bSTimur Tabi 	}
460118033bSTimur Tabi 
475e5fdd2dSYork Sun #if defined(CONFIG_ARCH_P2041) || defined(CONFIG_ARCH_P3041)
480118033bSTimur Tabi 	x108 = 0x12;
490118033bSTimur Tabi #endif
500118033bSTimur Tabi 
51e71372cbSYork Sun #ifdef CONFIG_ARCH_P4080
520118033bSTimur Tabi 	/*
530118033bSTimur Tabi 	 * For P4080, the erratum document says that the value at offset 0x108
540118033bSTimur Tabi 	 * should be 0x12 on rev2, or 0x1c on rev3.
550118033bSTimur Tabi 	 */
560118033bSTimur Tabi 	if (SVR_MAJ(svr) == 2)
570118033bSTimur Tabi 		x108 = 0x12;
580118033bSTimur Tabi 	if (SVR_MAJ(svr) == 3)
590118033bSTimur Tabi 		x108 = 0x1c;
600118033bSTimur Tabi #endif
610118033bSTimur Tabi 
620118033bSTimur Tabi 	if (in_be32(dcsr + 0x108) != x108) {
630118033bSTimur Tabi 		printf("Work-around for Erratum A004849 is not enabled\n");
640118033bSTimur Tabi 		return;
650118033bSTimur Tabi 	}
660118033bSTimur Tabi 
670118033bSTimur Tabi 	/* Everything matches, so the erratum work-around was applied */
680118033bSTimur Tabi 
690118033bSTimur Tabi 	printf("Work-around for Erratum A004849 enabled\n");
700118033bSTimur Tabi }
710118033bSTimur Tabi #endif
720118033bSTimur Tabi 
73d607b968STimur Tabi #ifdef CONFIG_SYS_FSL_ERRATUM_A004580
74d607b968STimur Tabi /*
75d607b968STimur Tabi  * This work-around is implemented in PBI, so just check to see if the
76d607b968STimur Tabi  * work-around was actually applied.  To do this, we check for specific data
77d607b968STimur Tabi  * at specific addresses in the SerDes register block.
78d607b968STimur Tabi  *
79d607b968STimur Tabi  * The work-around says that for each SerDes lane, write BnTTLCRy0 =
80d607b968STimur Tabi  * 0x1B00_0001, Register 2 = 0x0088_0000, and Register 3 = 0x4000_0000.
81d607b968STimur Tabi 
82d607b968STimur Tabi  */
check_erratum_a4580(uint32_t svr)83d607b968STimur Tabi static void check_erratum_a4580(uint32_t svr)
84d607b968STimur Tabi {
85d607b968STimur Tabi 	const serdes_corenet_t __iomem *srds_regs =
86d607b968STimur Tabi 		(void *)CONFIG_SYS_FSL_CORENET_SERDES_ADDR;
87d607b968STimur Tabi 	unsigned int lane;
88d607b968STimur Tabi 
89d607b968STimur Tabi 	for (lane = 0; lane < SRDS_MAX_LANES; lane++) {
90d607b968STimur Tabi 		if (serdes_lane_enabled(lane)) {
91d607b968STimur Tabi 			const struct serdes_lane __iomem *srds_lane =
92d607b968STimur Tabi 				&srds_regs->lane[serdes_get_lane_idx(lane)];
93d607b968STimur Tabi 
94d607b968STimur Tabi 			/*
95d607b968STimur Tabi 			 * Verify that the values we were supposed to write in
96d607b968STimur Tabi 			 * the PBI are actually there.  Also, the lower 15
97d607b968STimur Tabi 			 * bits of res4[3] should be the same as the upper 15
98d607b968STimur Tabi 			 * bits of res4[1].
99d607b968STimur Tabi 			 */
100d607b968STimur Tabi 			if ((in_be32(&srds_lane->ttlcr0) != 0x1b000001) ||
101d607b968STimur Tabi 			    (in_be32(&srds_lane->res4[1]) != 0x880000) ||
102d607b968STimur Tabi 			    (in_be32(&srds_lane->res4[3]) != 0x40000044)) {
103d607b968STimur Tabi 				printf("Work-around for Erratum A004580 is "
104d607b968STimur Tabi 				       "not enabled\n");
105d607b968STimur Tabi 				return;
106d607b968STimur Tabi 			}
107d607b968STimur Tabi 		}
108d607b968STimur Tabi 	}
109d607b968STimur Tabi 
110d607b968STimur Tabi 	/* Everything matches, so the erratum work-around was applied */
111d607b968STimur Tabi 
112d607b968STimur Tabi 	printf("Work-around for Erratum A004580 enabled\n");
113d607b968STimur Tabi }
114d607b968STimur Tabi #endif
115d607b968STimur Tabi 
116c3678b09SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A007212
117c3678b09SYork Sun /*
118c3678b09SYork Sun  * This workaround can be implemented in PBI, or by u-boot.
119c3678b09SYork Sun  */
check_erratum_a007212(void)120c3678b09SYork Sun static void check_erratum_a007212(void)
121c3678b09SYork Sun {
122c3678b09SYork Sun 	u32 __iomem *plldgdcr = (void *)(CONFIG_SYS_DCSRBAR + 0x21c20);
123c3678b09SYork Sun 
124c3678b09SYork Sun 	if (in_be32(plldgdcr) & 0x1fe) {
125c3678b09SYork Sun 		/* check if PLL ratio is set by workaround */
126c3678b09SYork Sun 		puts("Work-around for Erratum A007212 enabled\n");
127c3678b09SYork Sun 	}
128c3678b09SYork Sun }
129c3678b09SYork Sun #endif
130c3678b09SYork Sun 
do_errata(cmd_tbl_t * cmdtp,int flag,int argc,char * const argv[])13179ee3448SKumar Gala static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
13279ee3448SKumar Gala {
13357125f22SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
13457125f22SYork Sun 	extern int enable_cpu_a011_workaround;
13557125f22SYork Sun #endif
13679ee3448SKumar Gala 	__maybe_unused u32 svr = get_svr();
13779ee3448SKumar Gala 
13863659ff3SYork Sun #if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_SYS_FSL_ERRATUM_SATA_A001)
13979ee3448SKumar Gala 	if (IS_SVR_REV(svr, 1, 0)) {
14079ee3448SKumar Gala 		switch (SVR_SOC_VER(svr)) {
14179ee3448SKumar Gala 		case SVR_P1013:
14279ee3448SKumar Gala 		case SVR_P1022:
14379ee3448SKumar Gala 			puts("Work-around for Erratum SATA A001 enabled\n");
14479ee3448SKumar Gala 		}
14579ee3448SKumar Gala 	}
14679ee3448SKumar Gala #endif
14779ee3448SKumar Gala 
14861054ffaSKumar Gala #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
14961054ffaSKumar Gala 	puts("Work-around for Erratum SERDES8 enabled\n");
15061054ffaSKumar Gala #endif
151df8af0b4SEmil Medve #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9)
152df8af0b4SEmil Medve 	puts("Work-around for Erratum SERDES9 enabled\n");
153df8af0b4SEmil Medve #endif
154da30b9fdSTimur Tabi #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES_A005)
155da30b9fdSTimur Tabi 	puts("Work-around for Erratum SERDES-A005 enabled\n");
156da30b9fdSTimur Tabi #endif
157fd3c9befSKumar Gala #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
1581e9ea85fSYork Sun 	if (SVR_MAJ(svr) < 3)
159fd3c9befSKumar Gala 		puts("Work-around for Erratum CPU22 enabled\n");
160fd3c9befSKumar Gala #endif
1615e23ab0aSYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
1625e23ab0aSYork Sun 	/*
1635e23ab0aSYork Sun 	 * NMG_CPU_A011 applies to P4080 rev 1.0, 2.0, fixed in 3.0
1645e23ab0aSYork Sun 	 * also applies to P3041 rev 1.0, 1.1, P2041 rev 1.0, 1.1
16557125f22SYork Sun 	 * The SVR has been checked by cpu_init_r().
1665e23ab0aSYork Sun 	 */
16757125f22SYork Sun 	if (enable_cpu_a011_workaround)
1685e23ab0aSYork Sun 		puts("Work-around for Erratum CPU-A011 enabled\n");
1695e23ab0aSYork Sun #endif
17043f082bbSKumar Gala #if defined(CONFIG_SYS_FSL_ERRATUM_CPU_A003999)
17143f082bbSKumar Gala 	puts("Work-around for Erratum CPU-A003999 enabled\n");
17243f082bbSKumar Gala #endif
1734108508aSYork Sun #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_A003474)
174b5188164SYork Sun 	puts("Work-around for Erratum DDR-A003474 enabled\n");
1754108508aSYork Sun #endif
176810c4427SBecky Bruce #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
177810c4427SBecky Bruce 	puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
178810c4427SBecky Bruce #endif
179d621da00SJerry Huang #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
180d621da00SJerry Huang 	puts("Work-around for Erratum ESDHC111 enabled\n");
181d621da00SJerry Huang #endif
182eb539412SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A004468
183eb539412SYork Sun 	puts("Work-around for Erratum A004468 enabled\n");
184eb539412SYork Sun #endif
1853b4456ecSRoy Zang #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
1863b4456ecSRoy Zang 	puts("Work-around for Erratum ESDHC135 enabled\n");
1873b4456ecSRoy Zang #endif
1884e0be34aSZang Roy-R61911 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC13)
1894e0be34aSZang Roy-R61911 	if (SVR_MAJ(svr) < 3)
1904e0be34aSZang Roy-R61911 		puts("Work-around for Erratum ESDHC13 enabled\n");
191ae026ffdSRoy Zang #endif
1925103a03aSKumar Gala #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
1935103a03aSKumar Gala 	puts("Work-around for Erratum ESDHC-A001 enabled\n");
1945103a03aSKumar Gala #endif
1951d2c2a62SKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
1961d2c2a62SKumar Gala 	puts("Work-around for Erratum CPC-A002 enabled\n");
1971d2c2a62SKumar Gala #endif
198868da593SKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
199868da593SKumar Gala 	puts("Work-around for Erratum CPC-A003 enabled\n");
200868da593SKumar Gala #endif
201f133796dSKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
202f133796dSKumar Gala 	puts("Work-around for Erratum ELBC-A001 enabled\n");
203f133796dSKumar Gala #endif
204fa8d23c0SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
205fa8d23c0SYork Sun 	puts("Work-around for Erratum DDR-A003 enabled\n");
206fa8d23c0SYork Sun #endif
207eb0aff77SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
208eb0aff77SYork Sun 	puts("Work-around for Erratum DDR115 enabled\n");
209eb0aff77SYork Sun #endif
21091671913SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134
21191671913SYork Sun 	puts("Work-around for Erratum DDR111 enabled\n");
21291671913SYork Sun 	puts("Work-around for Erratum DDR134 enabled\n");
21391671913SYork Sun #endif
21442aee64bSPoonam Aggrwal #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A002769
21542aee64bSPoonam Aggrwal 	puts("Work-around for Erratum IFC-A002769 enabled\n");
21642aee64bSPoonam Aggrwal #endif
217fb855f43SPoonam Aggrwal #ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
218fb855f43SPoonam Aggrwal 	puts("Work-around for Erratum P1010-A003549 enabled\n");
219fb855f43SPoonam Aggrwal #endif
220bc6bbd6bSPoonam Aggrwal #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A003399
221bc6bbd6bSPoonam Aggrwal 	puts("Work-around for Erratum IFC A-003399 enabled\n");
222bc6bbd6bSPoonam Aggrwal #endif
2235ace2992SKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_DDR120
2245ace2992SKumar Gala 	if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
2255ace2992SKumar Gala 		puts("Work-around for Erratum NMG DDR120 enabled\n");
2265ace2992SKumar Gala #endif
2272b3a1cddSKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103
2282b3a1cddSKumar Gala 	puts("Work-around for Erratum NMG_LBC103 enabled\n");
2292b3a1cddSKumar Gala #endif
230aada81deSchenhui zhao #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129
231aada81deSchenhui zhao 	if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
232aada81deSchenhui zhao 		puts("Work-around for Erratum NMG ETSEC129 enabled\n");
233aada81deSchenhui zhao #endif
2349855b3beSYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A004508
2359855b3beSYork Sun 	puts("Work-around for Erratum A004508 enabled\n");
2369855b3beSYork Sun #endif
23733eee330SScott Wood #ifdef CONFIG_SYS_FSL_ERRATUM_A004510
23833eee330SScott Wood 	puts("Work-around for Erratum A004510 enabled\n");
23933eee330SScott Wood #endif
240d59c5570SLiu Gang #ifdef CONFIG_SYS_FSL_ERRATUM_SRIO_A004034
241d59c5570SLiu Gang 	puts("Work-around for Erratum SRIO-A004034 enabled\n");
242d59c5570SLiu Gang #endif
243a1d558a2SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A_004934
244a1d558a2SYork Sun 	puts("Work-around for Erratum A004934 enabled\n");
245a1d558a2SYork Sun #endif
24672bd83cdSShengzhou Liu #ifdef CONFIG_SYS_FSL_ERRATUM_A005871
24772bd83cdSShengzhou Liu 	if (IS_SVR_REV(svr, 1, 0))
24872bd83cdSShengzhou Liu 		puts("Work-around for Erratum A005871 enabled\n");
24972bd83cdSShengzhou Liu #endif
2507af9a074SShaveta Leekha #ifdef CONFIG_SYS_FSL_ERRATUM_A006475
2517af9a074SShaveta Leekha 	if (SVR_MAJ(get_svr()) == 1)
2527af9a074SShaveta Leekha 		puts("Work-around for Erratum A006475 enabled\n");
2537af9a074SShaveta Leekha #endif
2547af9a074SShaveta Leekha #ifdef CONFIG_SYS_FSL_ERRATUM_A006384
2557af9a074SShaveta Leekha 	if (SVR_MAJ(get_svr()) == 1)
2567af9a074SShaveta Leekha 		puts("Work-around for Erratum A006384 enabled\n");
2577af9a074SShaveta Leekha #endif
2580118033bSTimur Tabi #ifdef CONFIG_SYS_FSL_ERRATUM_A004849
2590118033bSTimur Tabi 	/* This work-around is implemented in PBI, so just check for it */
2600118033bSTimur Tabi 	check_erratum_a4849(svr);
2610118033bSTimur Tabi #endif
262d607b968STimur Tabi #ifdef CONFIG_SYS_FSL_ERRATUM_A004580
263d607b968STimur Tabi 	/* This work-around is implemented in PBI, so just check for it */
264d607b968STimur Tabi 	check_erratum_a4580(svr);
265d607b968STimur Tabi #endif
266c0a4e6b8SYuanquan Chen #ifdef CONFIG_SYS_P4080_ERRATUM_PCIE_A003
267c0a4e6b8SYuanquan Chen 	puts("Work-around for Erratum PCIe-A003 enabled\n");
268c0a4e6b8SYuanquan Chen #endif
26999d7b0a4SXulei #ifdef CONFIG_SYS_FSL_ERRATUM_USB14
27099d7b0a4SXulei 	puts("Work-around for Erratum USB14 enabled\n");
27199d7b0a4SXulei #endif
272b6808cd8SShaveta Leekha #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
273e7f533cdSZhao Qiang 	if (has_erratum_a007186())
274b6808cd8SShaveta Leekha 		puts("Work-around for Erratum A007186 enabled\n");
275b6808cd8SShaveta Leekha #endif
27682125192SScott Wood #ifdef CONFIG_SYS_FSL_ERRATUM_A006593
27782125192SScott Wood 	puts("Work-around for Erratum A006593 enabled\n");
27882125192SScott Wood #endif
279133fbfa9SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A006379
280133fbfa9SYork Sun 	if (has_erratum_a006379())
281133fbfa9SYork Sun 		puts("Work-around for Erratum A006379 enabled\n");
282133fbfa9SYork Sun #endif
283424bf942SShengzhou Liu #ifdef CONFIG_SYS_FSL_ERRATUM_SEC_A003571
284424bf942SShengzhou Liu 	if (IS_SVR_REV(svr, 1, 0))
285424bf942SShengzhou Liu 		puts("Work-around for Erratum A003571 enabled\n");
286424bf942SShengzhou Liu #endif
287d217a9adSYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A005812
288d217a9adSYork Sun 	puts("Work-around for Erratum A-005812 enabled\n");
289d217a9adSYork Sun #endif
290954a1a47SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A005125
291954a1a47SYork Sun 	puts("Work-around for Erratum A005125 enabled\n");
292954a1a47SYork Sun #endif
29311856919SNikhil Badola #ifdef CONFIG_SYS_FSL_ERRATUM_A007075
29411856919SNikhil Badola 	if (has_erratum_a007075())
29511856919SNikhil Badola 		puts("Work-around for Erratum A007075 enabled\n");
29611856919SNikhil Badola #endif
297f3dff695SNikhil Badola #ifdef CONFIG_SYS_FSL_ERRATUM_A007798
298f3dff695SNikhil Badola 	if (has_erratum_a007798())
299f3dff695SNikhil Badola 		puts("Work-around for Erratum A007798 enabled\n");
300f3dff695SNikhil Badola #endif
3010dc78ff8SNikhil Badola #ifdef CONFIG_SYS_FSL_ERRATUM_A004477
3020dc78ff8SNikhil Badola 	if (has_erratum_a004477())
3030dc78ff8SNikhil Badola 		puts("Work-around for Erratum A004477 enabled\n");
3040dc78ff8SNikhil Badola #endif
3059c3f77ebSChunhe Lan #ifdef CONFIG_SYS_FSL_ERRATUM_I2C_A004447
3069c3f77ebSChunhe Lan 	if ((SVR_SOC_VER(svr) == SVR_8548 && IS_SVR_REV(svr, 3, 1)) ||
3079c3f77ebSChunhe Lan 	    (SVR_REV(svr) <= CONFIG_SYS_FSL_A004447_SVR_REV))
3089c3f77ebSChunhe Lan 		puts("Work-around for Erratum I2C-A004447 enabled\n");
3099c3f77ebSChunhe Lan #endif
310*4eaf7f52SChris Packham #ifdef CONFIG_SYS_FSL_ERRATUM_A005275
311*4eaf7f52SChris Packham 	if (has_erratum_a005275())
312*4eaf7f52SChris Packham 		puts("Work-around for Erratum A005275 enabled\n");
313*4eaf7f52SChris Packham #endif
3149c641a87SSuresh Gupta #ifdef CONFIG_SYS_FSL_ERRATUM_A006261
3159c641a87SSuresh Gupta 	if (has_erratum_a006261())
3169c641a87SSuresh Gupta 		puts("Work-around for Erratum A006261 enabled\n");
3179c641a87SSuresh Gupta #endif
318c3678b09SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_A007212
319c3678b09SYork Sun 	check_erratum_a007212();
320c3678b09SYork Sun #endif
321f1a96ec1SChunhe Lan #ifdef CONFIG_SYS_FSL_ERRATUM_A005434
322f1a96ec1SChunhe Lan 	puts("Work-around for Erratum A-005434 enabled\n");
323f1a96ec1SChunhe Lan #endif
3249f074e67SPrabhakar Kushwaha #if defined(CONFIG_SYS_FSL_ERRATUM_A008044) && \
3259f074e67SPrabhakar Kushwaha 	defined(CONFIG_A008044_WORKAROUND)
32631530e0bSPrabhakar Kushwaha 	if (IS_SVR_REV(svr, 1, 0))
3279f074e67SPrabhakar Kushwaha 		puts("Work-around for Erratum A-008044 enabled\n");
3289f074e67SPrabhakar Kushwaha #endif
329d46a4a13SYork Sun #if defined(CONFIG_SYS_FSL_B4860QDS_XFI_ERR) && \
330d46a4a13SYork Sun 	(defined(CONFIG_TARGET_B4860QDS) || defined(CONFIG_TARGET_B4420QDS))
331b24f6d40SShaohui Xie 	puts("Work-around for Erratum XFI on B4860QDS enabled\n");
332b24f6d40SShaohui Xie #endif
333a994b3deSShengzhou Liu #ifdef CONFIG_SYS_FSL_ERRATUM_A009663
334a994b3deSShengzhou Liu 	puts("Work-around for Erratum A009663 enabled\n");
335a994b3deSShengzhou Liu #endif
33606ad970bSDarwin Dingel #ifdef CONFIG_SYS_FSL_ERRATUM_A007907
33706ad970bSDarwin Dingel 	puts("Work-around for Erratum A007907 enabled\n");
33806ad970bSDarwin Dingel #endif
33909bfd962STony O'Brien #ifdef CONFIG_SYS_FSL_ERRATUM_A007815
34009bfd962STony O'Brien 	puts("Work-around for Erratum A007815 enabled\n");
34109bfd962STony O'Brien #endif
34209bfd962STony O'Brien 
34379ee3448SKumar Gala 	return 0;
34479ee3448SKumar Gala }
34579ee3448SKumar Gala 
34679ee3448SKumar Gala U_BOOT_CMD(
34779ee3448SKumar Gala 	errata, 1, 0,	do_errata,
34879ee3448SKumar Gala 	"Report errata workarounds",
34979ee3448SKumar Gala 	""
35079ee3448SKumar Gala );
351