CRIS v32: nand: set ECC algorithm explicitly
authorRafał Miłecki <zajec5@gmail.com>
Sun, 17 Apr 2016 20:53:00 +0000 (22:53 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 5 May 2016 21:52:03 +0000 (23:52 +0200)
This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
enum nand_ecc_algo).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
arch/cris/arch-v32/drivers/mach-a3/nandflash.c
arch/cris/arch-v32/drivers/mach-fs/nandflash.c

index 5aa3f516231081ccc92e29999e9826b8d61a85b4..3f646c787e584e40a097208abd9fdb05221cf755 100644 (file)
@@ -157,6 +157,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        /* 20 us command delay time */
        this->chip_delay = 20;
        this->ecc.mode = NAND_ECC_SOFT;
+       this->ecc.algo = NAND_ECC_HAMMING;
 
        /* Enable the following for a flash based bad block table */
        /* this->bbt_options = NAND_BBT_USE_FLASH; */
index a7c17b0f172a360e4b57465ad7c19b8c5196ac2f..a74540514bdbdcde086259df8f08a9beec340cd0 100644 (file)
@@ -148,6 +148,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void)
        /* 20 us command delay time */
        this->chip_delay = 20;
        this->ecc.mode = NAND_ECC_SOFT;
+       this->ecc.algo = NAND_ECC_HAMMING;
 
        /* Enable the following for a flash based bad block table */
        /* this->bbt_options = NAND_BBT_USE_FLASH; */