]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commitdiff
ARM: OMAP2+: nand: Fix NAND on OMAP2 and OMAP3 boards
authorRoger Quadros <rogerq@ti.com>
Fri, 16 May 2014 21:45:40 +0000 (14:45 -0700)
committerDan Murphy <DMurphy@ti.com>
Mon, 9 Jun 2014 13:45:15 +0000 (08:45 -0500)
[ Upstream commit 5005e0b76781c37d0a16dd6dd17d015098e8ce92 ]

Commit c66d039197e4 broke NAND for non-DT boot on all OMAP2 and OMAP3
boards using board_nand_init(). Following error is seen at boot

[    0.154998]  (null): Unsupported NAND ECC scheme selected

For OMAP2 and OMAP3 platforms, the ecc_opt parameter in platform data
must be set to OMAP_ECC_HAM1_CODE_HW to work properly.

Tested on omap3-beagle c4.

Fixes: c66d039197e4 (mtd: nand: omap: combine different flavours of 1-bit hamming ecc schemes)
Cc: stable@vger.kernel.org # v3.12+
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Dan Murphy <DMurphy@ti.com>
arch/arm/mach-omap2/board-flash.c

index ac82512b9c8c641e044596f737cbe3a518eefe74..b6885e42c0a0749279cdac1babd1e0825f23742a 100644 (file)
@@ -142,7 +142,7 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs,
        board_nand_data.nr_parts        = nr_parts;
        board_nand_data.devsize         = nand_type;
 
-       board_nand_data.ecc_opt = OMAP_ECC_BCH8_CODE_HW;
+       board_nand_data.ecc_opt = OMAP_ECC_HAM1_CODE_HW;
        gpmc_nand_init(&board_nand_data, gpmc_t);
 }
 #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */