2010-06-10 03:59:41 +00:00
|
|
|
/*
|
2011-01-07 05:42:19 +00:00
|
|
|
* Copyright 2010-2011 Freescale Semiconductor, Inc.
|
2010-06-10 03:59:41 +00:00
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
|
|
|
|
static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|
|
|
{
|
2012-08-08 18:04:53 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
|
|
|
|
extern int enable_cpu_a011_workaround;
|
|
|
|
#endif
|
2010-06-10 03:59:41 +00:00
|
|
|
__maybe_unused u32 svr = get_svr();
|
|
|
|
|
|
|
|
#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
|
|
|
|
if (IS_SVR_REV(svr, 1, 0)) {
|
|
|
|
switch (SVR_SOC_VER(svr)) {
|
|
|
|
case SVR_P1013:
|
|
|
|
case SVR_P1022:
|
|
|
|
puts("Work-around for Erratum SATA A001 enabled\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-07-13 05:39:46 +00:00
|
|
|
#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8)
|
|
|
|
puts("Work-around for Erratum SERDES8 enabled\n");
|
|
|
|
#endif
|
2010-09-01 03:57:38 +00:00
|
|
|
#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9)
|
|
|
|
puts("Work-around for Erratum SERDES9 enabled\n");
|
|
|
|
#endif
|
2011-04-01 18:19:36 +00:00
|
|
|
#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES_A005)
|
|
|
|
puts("Work-around for Erratum SERDES-A005 enabled\n");
|
|
|
|
#endif
|
2010-05-06 03:35:27 +00:00
|
|
|
#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22)
|
2012-05-07 07:26:45 +00:00
|
|
|
if (SVR_MAJ(svr) < 3)
|
|
|
|
puts("Work-around for Erratum CPU22 enabled\n");
|
2010-12-17 23:17:58 +00:00
|
|
|
#endif
|
2012-05-07 07:26:47 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_CPU_A011
|
|
|
|
/*
|
|
|
|
* NMG_CPU_A011 applies to P4080 rev 1.0, 2.0, fixed in 3.0
|
|
|
|
* also applies to P3041 rev 1.0, 1.1, P2041 rev 1.0, 1.1
|
2012-08-08 18:04:53 +00:00
|
|
|
* The SVR has been checked by cpu_init_r().
|
2012-05-07 07:26:47 +00:00
|
|
|
*/
|
2012-08-08 18:04:53 +00:00
|
|
|
if (enable_cpu_a011_workaround)
|
2012-05-07 07:26:47 +00:00
|
|
|
puts("Work-around for Erratum CPU-A011 enabled\n");
|
|
|
|
#endif
|
2011-11-22 12:51:15 +00:00
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_CPU_A003999)
|
|
|
|
puts("Work-around for Erratum CPU-A003999 enabled\n");
|
|
|
|
#endif
|
2011-11-20 18:01:35 +00:00
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_DDR_A003474)
|
|
|
|
puts("Work-around for Erratum DDR-A003473 enabled\n");
|
|
|
|
#endif
|
2010-12-17 23:17:58 +00:00
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_DDR_MSYNC_IN)
|
|
|
|
puts("Work-around for DDR MSYNC_IN Erratum enabled\n");
|
2011-01-07 05:42:19 +00:00
|
|
|
#endif
|
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC111)
|
|
|
|
puts("Work-around for Erratum ESDHC111 enabled\n");
|
2011-01-07 06:06:47 +00:00
|
|
|
#endif
|
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC135)
|
|
|
|
puts("Work-around for Erratum ESDHC135 enabled\n");
|
2011-01-07 06:24:27 +00:00
|
|
|
#endif
|
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136)
|
|
|
|
puts("Work-around for Erratum ESDHC136 enabled\n");
|
2010-05-06 03:35:27 +00:00
|
|
|
#endif
|
2011-01-29 21:36:10 +00:00
|
|
|
#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001)
|
|
|
|
puts("Work-around for Erratum ESDHC-A001 enabled\n");
|
|
|
|
#endif
|
2011-01-13 07:54:01 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002
|
|
|
|
puts("Work-around for Erratum CPC-A002 enabled\n");
|
|
|
|
#endif
|
2011-01-13 07:56:18 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A003
|
|
|
|
puts("Work-around for Erratum CPC-A003 enabled\n");
|
|
|
|
#endif
|
2011-01-13 08:58:23 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_ELBC_A001
|
|
|
|
puts("Work-around for Erratum ELBC-A001 enabled\n");
|
|
|
|
#endif
|
2011-01-10 12:03:01 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_DDR_A003
|
|
|
|
puts("Work-around for Erratum DDR-A003 enabled\n");
|
|
|
|
#endif
|
2011-01-26 05:51:27 +00:00
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_DDR_115
|
|
|
|
puts("Work-around for Erratum DDR115 enabled\n");
|
2011-01-26 06:05:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134
|
|
|
|
puts("Work-around for Erratum DDR111 enabled\n");
|
|
|
|
puts("Work-around for Erratum DDR134 enabled\n");
|
2011-06-30 08:00:28 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A002769
|
|
|
|
puts("Work-around for Erratum IFC-A002769 enabled\n");
|
2011-06-29 11:02:52 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_P1010_A003549
|
|
|
|
puts("Work-around for Erratum P1010-A003549 enabled\n");
|
2011-07-07 15:06:47 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_IFC_A003399
|
|
|
|
puts("Work-around for Erratum IFC A-003399 enabled\n");
|
2011-09-16 14:54:30 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_DDR120
|
|
|
|
if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
|
|
|
|
puts("Work-around for Erratum NMG DDR120 enabled\n");
|
2011-10-03 13:37:57 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_LBC103
|
|
|
|
puts("Work-around for Erratum NMG_LBC103 enabled\n");
|
2011-10-03 13:38:50 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129
|
|
|
|
if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
|
|
|
|
puts("Work-around for Erratum NMG ETSEC129 enabled\n");
|
powerpc/fsl-corenet: work around erratum A004510
Erratum A004510 says that under certain load conditions, modified
cache lines can be discarded, causing data corruption.
To work around this, several CCSR and DCSR register updates need to be
made in a careful manner, so that there is no other transaction in
corenet when the update is made.
The update is made from a locked cacheline, with a delay before to flush
any previous activity, and a delay after to flush the CCSR/DCSR update.
We can't use a readback because that would be another corenet
transaction, which is not allowed.
We lock the subsequent cacheline to prevent it from being fetched while
we're executing the previous cacheline. It is filled with nops so that a
branch doesn't cause us to fetch another cacheline.
Ordinarily we are running in a cache-inhibited mapping at this point, so
we temporarily change that. We make it guarded so that we should never
see a speculative load, and we never do an explicit load. Thus, only the
I-cache should ever fill from this mapping, and we flush/unlock it
afterward. Thus we should avoid problems from any potential cache
aliasing between inhibited and non-inhibited mappings.
NOTE that if PAMU is used with this patch, it will need to use a
dedicated LAW as described in the erratum. This is the responsibility
of the OS that sets up PAMU.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-08-14 10:14:53 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_SYS_FSL_ERRATUM_A004510
|
|
|
|
puts("Work-around for Erratum A004510 enabled\n");
|
2011-01-26 05:51:27 +00:00
|
|
|
#endif
|
2010-06-10 03:59:41 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
U_BOOT_CMD(
|
|
|
|
errata, 1, 0, do_errata,
|
|
|
|
"Report errata workarounds",
|
|
|
|
""
|
|
|
|
);
|