diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-08-27 10:52:08 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-09-30 16:44:15 +0200 |
commit | b5156335ac37f186812090795ed27884a76c3266 (patch) | |
tree | 8c9ba5faf10e168ab9b38a624be4c3a0c07c4018 /drivers/mtd/nand/raw/sunxi_nand.c | |
parent | d7157ff49a5b5845b37b8f2bf31607f0af295ef1 (diff) | |
download | lwn-b5156335ac37f186812090795ed27884a76c3266.tar.gz lwn-b5156335ac37f186812090795ed27884a76c3266.zip |
mtd: rawnand: Use the NAND framework user_conf object for ECC flags
Instead of storing the ECC flags in chip->ecc.options, use
nanddev->ecc.user_conf.flags.
There is currently only one to save: NAND_ECC_MAXIMIZE.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-21-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/sunxi_nand.c')
-rw-r--r-- | drivers/mtd/nand/raw/sunxi_nand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index b7b764ef4b1d..2a7ca3072f35 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1609,12 +1609,13 @@ static int sunxi_nand_hw_ecc_ctrl_init(struct nand_chip *nand, static const u8 strengths[] = { 16, 24, 28, 32, 40, 48, 56, 60, 64 }; struct sunxi_nfc *nfc = to_sunxi_nfc(nand->controller); struct mtd_info *mtd = nand_to_mtd(nand); + struct nand_device *nanddev = mtd_to_nanddev(mtd); struct sunxi_nand_hw_ecc *data; int nsectors; int ret; int i; - if (ecc->options & NAND_ECC_MAXIMIZE) { + if (nanddev->ecc.user_conf.flags & NAND_ECC_MAXIMIZE_STRENGTH) { int bytes; ecc->size = 1024; |