]> git.sur5r.net Git - u-boot/commitdiff
OMAP3: am3517_evm: Use BCH8 ECC for NAND
authorDerald D. Woods <woods.technical@gmail.com>
Sat, 5 Mar 2016 19:19:58 +0000 (13:19 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 8 Mar 2016 20:00:39 +0000 (15:00 -0500)
Select 8-bit BCH ecc-scheme with s/w based error correction
- OMAP_ECC_BCH8_CODE_HW_DETECTION_SW

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/configs/am3517_evm.h

index 4d662ad3c21239b81da9830bd8f1234b503b061c..98a59c574aac08402185f94a6907fe3d892a4f94 100644 (file)
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_SIMPLE
-#define CONFIG_SPL_TEXT_BASE           0x40200800
-#define CONFIG_SPL_MAX_SIZE            (54 * 1024)     /* 8 KB for stack */
+#define CONFIG_SPL_TEXT_BASE           0x40200000
+#define CONFIG_SPL_MAX_SIZE            (64 * 1024)
 
 #define CONFIG_SPL_BSS_START_ADDR      0x80000000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x80000         /* 512 KB */
 #define CONFIG_SPL_LDSCRIPT            "$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#define CONFIG_BCH
+#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT     64
 #define CONFIG_SYS_NAND_PAGE_SIZE      2048
 #define CONFIG_SYS_NAND_OOBSIZE                64
-#define CONFIG_SYS_NAND_BLOCK_SIZE     (128*1024)
+#define CONFIG_SYS_NAND_BLOCK_SIZE     (128 * 1024)
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS  NAND_LARGE_BADBLOCK_POS
-#define CONFIG_SYS_NAND_ECCPOS         {2, 3, 4, 5, 6, 7, 8, 9,\
-                                               10, 11, 12, 13}
+#define CONFIG_SYS_NAND_ECCPOS         { 2,  3,  4,  5,  6,  7,  8,  9, 10, \
+                                        11, 12, 13, 14, 16, 17, 18, 19, 20, \
+                                        21, 22, 23, 24, 25, 26, 27, 28, 30, \
+                                        31, 32, 33, 34, 35, 36, 37, 38, 39, \
+                                        40, 41, 42, 44, 45, 46, 47, 48, 49, \
+                                        50, 51, 52, 53, 54, 55, 56 }
+
 #define CONFIG_SYS_NAND_ECCSIZE                512
-#define CONFIG_SYS_NAND_ECCBYTES       3
-#define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_HAM1_CODE_HW
+#define CONFIG_SYS_NAND_ECCBYTES       13
+#define CONFIG_NAND_OMAP_ECCSCHEME     OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
+#define CONFIG_SYS_NAND_MAX_OOBFREE    2
+#define CONFIG_SYS_NAND_MAX_ECCPOS     56
 #define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x80000