xref: /rk3399_rockchip-uboot/arch/powerpc/cpu/mpc85xx/cmd_errata.c (revision eb0aff77c83f70a01dfe47d72b08467c157f7a8b)
179ee3448SKumar Gala /*
2d621da00SJerry Huang  * Copyright 2010-2011 Freescale Semiconductor, Inc.
379ee3448SKumar Gala  *
479ee3448SKumar Gala  * See file CREDITS for list of people who contributed to this
579ee3448SKumar Gala  * project.
679ee3448SKumar Gala  *
779ee3448SKumar Gala  * This program is free software; you can redistribute it and/or
879ee3448SKumar Gala  * modify it under the terms of the GNU General Public License as
979ee3448SKumar Gala  * published by the Free Software Foundation; either version 2 of
1079ee3448SKumar Gala  * the License, or (at your option) any later version.
1179ee3448SKumar Gala  *
1279ee3448SKumar Gala  * This program is distributed in the hope that it will be useful,
1379ee3448SKumar Gala  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1479ee3448SKumar Gala  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1579ee3448SKumar Gala  * GNU General Public License for more details.
1679ee3448SKumar Gala  *
1779ee3448SKumar Gala  * You should have received a copy of the GNU General Public License
1879ee3448SKumar Gala  * along with this program; if not, write to the Free Software
1979ee3448SKumar Gala  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
2079ee3448SKumar Gala  * MA 02111-1307 USA
2179ee3448SKumar Gala  */
2279ee3448SKumar Gala 
2379ee3448SKumar Gala #include <common.h>
2479ee3448SKumar Gala #include <command.h>
2579ee3448SKumar Gala #include <linux/compiler.h>
2679ee3448SKumar Gala #include <asm/processor.h>
2779ee3448SKumar Gala 
2879ee3448SKumar Gala static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
2979ee3448SKumar Gala {
3079ee3448SKumar Gala 	__maybe_unused u32 svr = get_svr();
3179ee3448SKumar Gala 
3279ee3448SKumar Gala #if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
3379ee3448SKumar Gala 	if (IS_SVR_REV(svr, 1, 0)) {
3479ee3448SKumar Gala 		switch (SVR_SOC_VER(svr)) {
3579ee3448SKumar Gala 		case SVR_P1013:
3679ee3448SKumar Gala 		case SVR_P1013_E:
3779ee3448SKumar Gala 		case SVR_P1022:
3879ee3448SKumar Gala 		case SVR_P1022_E:
3979ee3448SKumar Gala 			puts("Work-around for Erratum SATA A001 enabled\n");
4079ee3448SKumar Gala 		}
4179ee3448SKumar Gala 	}
4279ee3448SKumar Gala #endif
4379ee3448SKumar Gala 
4461054ffaSKumar Gala #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
4561054ffaSKumar Gala 	puts("Work-around for Erratum SERDES8 enabled\n");
4661054ffaSKumar Gala #endif
47fd3c9befSKumar Gala #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
48fd3c9befSKumar Gala 	puts("Work-around for Erratum CPU22 enabled\n");
49fd3c9befSKumar Gala #endif
50810c4427SBecky Bruce #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
51810c4427SBecky Bruce 	puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
52810c4427SBecky Bruce #endif
53d621da00SJerry Huang #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
54d621da00SJerry Huang 	puts("Work-around for Erratum ESDHC111 enabled\n");
55d621da00SJerry Huang #endif
563b4456ecSRoy Zang #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
573b4456ecSRoy Zang 	puts("Work-around for Erratum ESDHC135 enabled\n");
583b4456ecSRoy Zang #endif
59ae026ffdSRoy Zang #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136)
60ae026ffdSRoy Zang 	puts("Work-around for Erratum ESDHC136 enabled\n");
61ae026ffdSRoy Zang #endif
625103a03aSKumar Gala #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
635103a03aSKumar Gala 	puts("Work-around for Erratum ESDHC-A001 enabled\n");
645103a03aSKumar Gala #endif
651d2c2a62SKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
661d2c2a62SKumar Gala 	puts("Work-around for Erratum CPC-A002 enabled\n");
671d2c2a62SKumar Gala #endif
68868da593SKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
69868da593SKumar Gala 	puts("Work-around for Erratum CPC-A003 enabled\n");
70868da593SKumar Gala #endif
71f133796dSKumar Gala #ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
72f133796dSKumar Gala 	puts("Work-around for Erratum ELBC-A001 enabled\n");
73f133796dSKumar Gala #endif
74fa8d23c0SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
75fa8d23c0SYork Sun 	puts("Work-around for Erratum DDR-A003 enabled\n");
76fa8d23c0SYork Sun #endif
77*eb0aff77SYork Sun #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
78*eb0aff77SYork Sun 	puts("Work-around for Erratum DDR115 enabled\n");
79*eb0aff77SYork Sun #endif
8079ee3448SKumar Gala 	return 0;
8179ee3448SKumar Gala }
8279ee3448SKumar Gala 
8379ee3448SKumar Gala U_BOOT_CMD(
8479ee3448SKumar Gala 	errata, 1, 0,	do_errata,
8579ee3448SKumar Gala 	"Report errata workarounds",
8679ee3448SKumar Gala 	""
8779ee3448SKumar Gala );
88