Skip to content

Commit

Permalink
mtd: nand: nandsim: set ECC algorithm explicitly
Browse files Browse the repository at this point in the history
This follows recent work on switching to enum nand_ecc_algo and
deprecating NAND_ECC_SOFT_BCH.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
  • Loading branch information
Rafał Miłecki authored and Boris Brezillon committed Apr 19, 2016
1 parent 7908245 commit 8ae6bcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/nand/nandsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,7 @@ static int __init ns_init_module(void)
chip->read_buf = ns_nand_read_buf;
chip->read_word = ns_nand_read_word;
chip->ecc.mode = NAND_ECC_SOFT;
chip->ecc.algo = NAND_ECC_HAMMING;
/* The NAND_SKIP_BBTSCAN option is necessary for 'overridesize' */
/* and 'badblocks' parameters to work */
chip->options |= NAND_SKIP_BBTSCAN;
Expand Down Expand Up @@ -2339,6 +2340,7 @@ static int __init ns_init_module(void)
goto error;
}
chip->ecc.mode = NAND_ECC_SOFT_BCH;
chip->ecc.algo = NAND_ECC_BCH;
chip->ecc.size = 512;
chip->ecc.strength = bch;
chip->ecc.bytes = eccbytes;
Expand Down

0 comments on commit 8ae6bcd

Please sign in to comment.