[PATCH 3/4] sama5d3: Fix Galois Field Table offsets

Tudor Ambarus tudor.ambarus at microchip.com
Fri Jan 8 13:40:19 CET 2021

Offsets are described in the datasheet at section:
" NAND Flash Boot: PMECC Error Detection and Correction".

For testing I "injected" bit flips into u-boot NAND memory area,
and then read back. PMECC could not correct the errors. With the
offsets updated everything is fine.

Fixes: 3225f34e5c ("ARM: atmel: add sama5d3xek support")
Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>
 arch/arm/mach-at91/include/mach/sama5d3.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h b/arch/arm/mach-at91/include/mach/sama5d3.h
index 83f18a8148..f4f05676f7 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3.h
+++ b/arch/arm/mach-at91/include/mach/sama5d3.h
@@ -190,8 +190,8 @@
  * PMECC table in ROM
-#define ATMEL_PMECC_INDEX_OFFSET_512	0x10000
-#define ATMEL_PMECC_INDEX_OFFSET_1024	0x18000
+#define ATMEL_PMECC_INDEX_OFFSET_512	0x8000
+#define ATMEL_PMECC_INDEX_OFFSET_1024	0x10000
  * SAMA5D3 specific prototypes

More information about the U-Boot mailing list