blob: 7e4cc036408f7bcac761678fe98bb7ff542f9f69 [file] [log] [blame]
Kumar Gala79ee3442010-06-09 22:59:41 -05001/*
Jerry Huangd621da02011-01-06 23:42:19 -06002 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Kumar Gala79ee3442010-06-09 22:59:41 -05003 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
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.
11 *
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.
16 *
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,
20 * MA 02111-1307 USA
21 */
22
23#include <common.h>
24#include <command.h>
25#include <linux/compiler.h>
26#include <asm/processor.h>
27
28static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
29{
York Sun57125f22012-08-08 18:04:53 +000030#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
31 extern int enable_cpu_a011_workaround;
32#endif
Kumar Gala79ee3442010-06-09 22:59:41 -050033 __maybe_unused u32 svr = get_svr();
34
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)) {
38 case SVR_P1013:
Kumar Gala79ee3442010-06-09 22:59:41 -050039 case SVR_P1022:
Kumar Gala79ee3442010-06-09 22:59:41 -050040 puts("Work-around for Erratum SATA A001 enabled\n");
41 }
42 }
43#endif
44
Kumar Gala61054ff2010-07-13 00:39:46 -050045#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
46 puts("Work-around for Erratum SERDES8 enabled\n");
47#endif
Emil Medvedf8af0b2010-08-31 22:57:38 -050048#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9)
49 puts("Work-around for Erratum SERDES9 enabled\n");
50#endif
Timur Tabida30b9f2011-04-01 13:19:36 -050051#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES_A005)
52 puts("Work-around for Erratum SERDES-A005 enabled\n");
53#endif
Kumar Galafd3c9be2010-05-05 22:35:27 -050054#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
York Sun1e9ea852012-05-07 07:26:45 +000055 if (SVR_MAJ(svr) < 3)
56 puts("Work-around for Erratum CPU22 enabled\n");
Kumar Galafd3c9be2010-05-05 22:35:27 -050057#endif
York Sun5e23ab02012-05-07 07:26:47 +000058#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
59 /*
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
York Sun57125f22012-08-08 18:04:53 +000062 * The SVR has been checked by cpu_init_r().
York Sun5e23ab02012-05-07 07:26:47 +000063 */
York Sun57125f22012-08-08 18:04:53 +000064 if (enable_cpu_a011_workaround)
York Sun5e23ab02012-05-07 07:26:47 +000065 puts("Work-around for Erratum CPU-A011 enabled\n");
66#endif
Kumar Gala43f082b2011-11-22 06:51:15 -060067#if defined(CONFIG_SYS_FSL_ERRATUM_CPU_A003999)
68 puts("Work-around for Erratum CPU-A003999 enabled\n");
69#endif
York Sun41085082011-11-20 10:01:35 -080070#if defined(CONFIG_SYS_FSL_ERRATUM_DDR_A003474)
71 puts("Work-around for Erratum DDR-A003473 enabled\n");
72#endif
Becky Bruce810c4422010-12-17 17:17:58 -060073#if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
74 puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
75#endif
Jerry Huangd621da02011-01-06 23:42:19 -060076#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
77 puts("Work-around for Erratum ESDHC111 enabled\n");
78#endif
Roy Zang3b4456e2011-01-07 00:06:47 -060079#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
80 puts("Work-around for Erratum ESDHC135 enabled\n");
81#endif
Zang Roy-R619114e0be342012-09-18 09:50:08 +000082#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC13)
83 if (SVR_MAJ(svr) < 3)
84 puts("Work-around for Erratum ESDHC13 enabled\n");
Roy Zangae026ff2011-01-07 00:24:27 -060085#endif
Kumar Gala5103a032011-01-29 15:36:10 -060086#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
87 puts("Work-around for Erratum ESDHC-A001 enabled\n");
88#endif
Kumar Gala1d2c2a62011-01-13 01:54:01 -060089#ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
90 puts("Work-around for Erratum CPC-A002 enabled\n");
91#endif
Kumar Gala868da592011-01-13 01:56:18 -060092#ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
93 puts("Work-around for Erratum CPC-A003 enabled\n");
94#endif
Kumar Galaf1337962011-01-13 02:58:23 -060095#ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
96 puts("Work-around for Erratum ELBC-A001 enabled\n");
97#endif
York Sunfa8d23c2011-01-10 12:03:01 +000098#ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
99 puts("Work-around for Erratum DDR-A003 enabled\n");
100#endif
York Suneb0aff72011-01-25 21:51:27 -0800101#ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
102 puts("Work-around for Erratum DDR115 enabled\n");
103#endif
York Sun91671912011-01-25 22:05:49 -0800104#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");
107#endif
Poonam Aggrwal42aee642011-06-30 03:00:28 -0500108#ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A002769
109 puts("Work-around for Erratum IFC-A002769 enabled\n");
110#endif
Poonam Aggrwalfb855f42011-06-29 16:32:52 +0530111#ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
112 puts("Work-around for Erratum P1010-A003549 enabled\n");
113#endif
Poonam Aggrwalbc6bbd62011-07-07 20:36:47 +0530114#ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A003399
115 puts("Work-around for Erratum IFC A-003399 enabled\n");
116#endif
Kumar Gala5ace2992011-09-16 09:54:30 -0500117#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");
120#endif
Kumar Gala2b3a1cd2011-10-03 08:37:57 -0500121#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103
122 puts("Work-around for Erratum NMG_LBC103 enabled\n");
123#endif
chenhui zhaoaada81d2011-10-03 08:38:50 -0500124#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");
127#endif
Scott Wood33eee332012-08-14 10:14:53 +0000128#ifdef CONFIG_SYS_FSL_ERRATUM_A004510
129 puts("Work-around for Erratum A004510 enabled\n");
130#endif
Kumar Gala79ee3442010-06-09 22:59:41 -0500131 return 0;
132}
133
134U_BOOT_CMD(
135 errata, 1, 0, do_errata,
136 "Report errata workarounds",
137 ""
138);