diff mbox series

ARM: at91: sama5d2: Enable the use of Galois Tables from ROM

Message ID 20220127083102.77408-1-tudor.ambarus@microchip.com
State Accepted
Commit 5576bb36ad7954af31474b778bfe037f5ef39ec6
Delegated to: Eugen Hristev
Headers show
Series ARM: at91: sama5d2: Enable the use of Galois Tables from ROM | expand

Commit Message

Tudor Ambarus Jan. 27, 2022, 8:31 a.m. UTC
sama5d2 contains in its ROM memory BCH code tables for NAND Flash ECC
correction. Enable the use of the GF tables defined in ROM. This should
speed up the boot process, as the tables are no longer constructed at
runtime. Tested with sama5d2-ptc-ek.

Reported-by: David Mosberger-Tang <davidm@egauge.net>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 arch/arm/mach-at91/include/mach/sama5d2.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Eugen Hristev Feb. 11, 2022, 8:20 a.m. UTC | #1
On 1/27/22 10:31 AM, Tudor Ambarus wrote:
> sama5d2 contains in its ROM memory BCH code tables for NAND Flash ECC
> correction. Enable the use of the GF tables defined in ROM. This should
> speed up the boot process, as the tables are no longer constructed at
> runtime. Tested with sama5d2-ptc-ek.
> 
> Reported-by: David Mosberger-Tang <davidm@egauge.net>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---

Applied to u-boot-at91/next , thanks !
diff mbox series

Patch

diff --git a/arch/arm/mach-at91/include/mach/sama5d2.h b/arch/arm/mach-at91/include/mach/sama5d2.h
index 9d9462725c..5ff20e9573 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2.h
@@ -129,6 +129,7 @@ 
 /*
  * Address Memory Space
  */
+#define ATMEL_BASE_ROM			0x00000000
 #define ATMEL_BASE_CS0			0x10000000
 #define ATMEL_BASE_DDRCS		0x20000000
 #define ATMEL_BASE_CS1			0x60000000
@@ -141,6 +142,12 @@ 
 #define ATMEL_BASE_QSPI0_MEM		0xd0000000
 #define ATMEL_BASE_QSPI1_MEM		0xd8000000
 
+/*
+ * PMECC tables in ROM
+ */
+#define ATMEL_PMECC_INDEX_OFFSET_512	0x40000
+#define ATMEL_PMECC_INDEX_OFFSET_1024	0x48000
+
 /*
  * Internal Memories
  */
@@ -233,9 +240,6 @@ 
 /* PIT Timer(PIT_PIIR) */
 #define CONFIG_SYS_TIMER_COUNTER	0xf804803c
 
-/* No PMECC Galois table in ROM */
-#define NO_GALOIS_TABLE_IN_ROM
-
 #ifndef __ASSEMBLY__
 unsigned int get_chip_id(void);
 unsigned int get_extension_chip_id(void);