diff mbox

[2/2] davinci: omapl138_lcdk: fix bad NAND ECC config

Message ID 20161205181521.10586-3-fparent@baylibre.com
State Accepted
Commit 2b2cab24ac7de0df79ab48d31473dbc06ff3740a
Headers show

Commit Message

Fabien Parent Dec. 5, 2016, 6:15 p.m. UTC
The configuration used to error correction was not in line with what
linux and the ROM code is using. Fix it by using the correct
configuration. Now u-boot and the SPL are able to read correctly
anything written by them.

Signed-off-by: Fabien Parent <fparent@baylibre.com>

---
 include/configs/omapl138_lcdk.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Tom Rini Dec. 5, 2016, 7:09 p.m. UTC | #1
On Mon, Dec 05, 2016 at 07:15:21PM +0100, Fabien Parent wrote:

> The configuration used to error correction was not in line with what

> linux and the ROM code is using. Fix it by using the correct

> configuration. Now u-boot and the SPL are able to read correctly

> anything written by them.

> 

> Signed-off-by: Fabien Parent <fparent@baylibre.com>


Reviewed-by: Tom Rini <trini@konsulko.com>


-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Tom Rini Dec. 12, 2016, 1:44 p.m. UTC | #2
On Mon, Dec 05, 2016 at 07:15:21PM +0100, Fabien Parent wrote:

> The configuration used to error correction was not in line with what

> linux and the ROM code is using. Fix it by using the correct

> configuration. Now u-boot and the SPL are able to read correctly

> anything written by them.

> 

> Signed-off-by: Fabien Parent <fparent@baylibre.com>

> Reviewed-by: Tom Rini <trini@konsulko.com>


Applied to u-boot/master, thanks!

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 2101086d59..a1e5f4481f 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -173,6 +173,7 @@ 
 #undef CONFIG_SYS_NAND_HW_ECC
 #define CONFIG_SYS_MAX_NAND_DEVICE	1 /* Max number of NAND devices */
 #define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
+#define CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	(2 << 10)
 #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 << 10)
@@ -184,11 +185,10 @@ 
 					CONFIG_SYS_MALLOC_LEN -       \
 					GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_NAND_ECCPOS		{				\
-				24, 25, 26, 27, 28, \
-				29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
-				39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
-				49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
-				59, 60, 61, 62, 63 }
+				6, 7, 8, 9, 10, 11, 12, 13, 14, 15,	\
+				22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \
+				38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \
+				54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0
 #define CONFIG_SYS_NAND_ECCSIZE		512