2 * Copyright 2010-2011 Freescale Semiconductor, Inc.
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <linux/compiler.h>
26 #include <asm/processor.h>
28 static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
30 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
31 extern int enable_cpu_a011_workaround;
33 __maybe_unused u32 svr = get_svr();
35 #if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
36 if (IS_SVR_REV(svr, 1, 0)) {
37 switch (SVR_SOC_VER(svr)) {
40 puts("Work-around for Erratum SATA A001 enabled\n");
45 #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
46 puts("Work-around for Erratum SERDES8 enabled\n");
48 #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9)
49 puts("Work-around for Erratum SERDES9 enabled\n");
51 #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES_A005)
52 puts("Work-around for Erratum SERDES-A005 enabled\n");
54 #if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
56 puts("Work-around for Erratum CPU22 enabled\n");
58 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
60 * NMG_CPU_A011 applies to P4080 rev 1.0, 2.0, fixed in 3.0
61 * also applies to P3041 rev 1.0, 1.1, P2041 rev 1.0, 1.1
62 * The SVR has been checked by cpu_init_r().
64 if (enable_cpu_a011_workaround)
65 puts("Work-around for Erratum CPU-A011 enabled\n");
67 #if defined(CONFIG_SYS_FSL_ERRATUM_CPU_A003999)
68 puts("Work-around for Erratum CPU-A003999 enabled\n");
70 #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_A003474)
71 puts("Work-around for Erratum DDR-A003473 enabled\n");
73 #if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
74 puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
76 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
77 puts("Work-around for Erratum ESDHC111 enabled\n");
79 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
80 puts("Work-around for Erratum ESDHC135 enabled\n");
82 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC13)
84 puts("Work-around for Erratum ESDHC13 enabled\n");
86 #if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
87 puts("Work-around for Erratum ESDHC-A001 enabled\n");
89 #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
90 puts("Work-around for Erratum CPC-A002 enabled\n");
92 #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
93 puts("Work-around for Erratum CPC-A003 enabled\n");
95 #ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
96 puts("Work-around for Erratum ELBC-A001 enabled\n");
98 #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
99 puts("Work-around for Erratum DDR-A003 enabled\n");
101 #ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
102 puts("Work-around for Erratum DDR115 enabled\n");
104 #ifdef CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134
105 puts("Work-around for Erratum DDR111 enabled\n");
106 puts("Work-around for Erratum DDR134 enabled\n");
108 #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A002769
109 puts("Work-around for Erratum IFC-A002769 enabled\n");
111 #ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
112 puts("Work-around for Erratum P1010-A003549 enabled\n");
114 #ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A003399
115 puts("Work-around for Erratum IFC A-003399 enabled\n");
117 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_DDR120
118 if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
119 puts("Work-around for Erratum NMG DDR120 enabled\n");
121 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103
122 puts("Work-around for Erratum NMG_LBC103 enabled\n");
124 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129
125 if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
126 puts("Work-around for Erratum NMG ETSEC129 enabled\n");
128 #ifdef CONFIG_SYS_FSL_ERRATUM_A004510
129 puts("Work-around for Erratum A004510 enabled\n");
131 #ifdef CONFIG_SYS_FSL_ERRATUM_SRIO_A004034
132 puts("Work-around for Erratum SRIO-A004034 enabled\n");
138 errata, 1, 0, do_errata,
139 "Report errata workarounds",