From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Sat, 24 Oct 2009 16:14:25 -0500 Subject: [U-Boot] [PATCH 1/5] 8xxx: Add 'ecc' command In-Reply-To: <392188CC-DD39-4918-BF1D-2D92F3A70B2A@kernel.crashing.org> References: <1256258353-25589-1-git-send-email-ptyser@xes-inc.com> <392188CC-DD39-4918-BF1D-2D92F3A70B2A@kernel.crashing.org> Message-ID: <4AE36E31.2060800@xes-inc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Kumar Gala wrote: > > On Oct 22, 2009, at 7:39 PM, Peter Tyser wrote: > >> Add a new 'ecc' command to interact with the 85xx and 86xx DDR ECC >> registers. The 'ecc' command can inject data/ECC errors to simulate >> errors and provides an 'info' subcommand which displays ECC error >> information such as failure address, read vs expected data/ECC, >> physical signal which failed, single-bit error count, and multiple bit >> error occurrence. An example of the 'ecc info' command follows: >> >> WARNING: ECC error in DDR Controller 0 >> Addr: 0x0_01001000 >> Data: 0x00000001_00000000 ECC: 0x00 >> Expect: 0x00000000_00000000 ECC: 0x00 >> Net: DATA32 >> Syndrome: 0xce >> Single-Bit errors: 0x40 >> Attrib: 0x30112001 >> Detect: 0x80000004 (MME, SBE) >> >> Signed-off-by: Peter Tyser >> Signed-off-by: John Schmoller >> --- >> This code was tested on a 8572, 8640, and P2020. A board with a >> 32-bit data bus was not tested however. >> >> cpu/mpc8xxx/ddr/Makefile | 2 + >> cpu/mpc8xxx/ddr/ecc.c | 371 >> ++++++++++++++++++++++++++++++++++++++++++ >> include/asm-ppc/immap_85xx.h | 4 + >> include/asm-ppc/immap_86xx.h | 3 + >> 4 files changed, 380 insertions(+), 0 deletions(-) >> create mode 100644 cpu/mpc8xxx/ddr/ecc.c >> >> diff --git a/cpu/mpc8xxx/ddr/Makefile b/cpu/mpc8xxx/ddr/Makefile >> index cb7f856..f073779 100644 >> --- a/cpu/mpc8xxx/ddr/Makefile >> +++ b/cpu/mpc8xxx/ddr/Makefile >> @@ -22,6 +22,8 @@ COBJS-$(CONFIG_FSL_DDR3) += main.o util.o >> ctrl_regs.o options.o \ >> lc_common_dimm_params.o >> COBJS-$(CONFIG_FSL_DDR3) += ddr3_dimm_params.o >> >> +COBJS-$(CONFIG_DDR_ECC_CMD) += ecc.o > > Should this be CONFIG_FSL_DDR_ECC_CMD ? I leaned towards CONFIG_DDR_ECC_CMD to prevent polluting the CONFIG_ namespace. We could add a new CONFIG_FSL_DDR_ECC_CMD, CONFIG_AVR32_DDR_ECC_CMD, etc, but I think (CONFIG_MPC85xx + CONFIG_DDR_ECC_CMD), (CONFIG_AVR32 + CONFIG_DDR_ECC_CMD), etc accomplishes the same thing, but only adds 1 new CONFIG_DDR_ECC_CMD config option. Doesn't really matter to me either way though... Peter