summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/r852.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-08-27 10:51:57 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-09-28 15:56:34 +0200
commitef24f97daac4d9450c956ab165d8337c2feca0e9 (patch)
treea840196fdfa6fec0fa309569ef4d5141de541a8d /drivers/mtd/nand/raw/r852.c
parenta8c7ffdb5fdde3a57c0b654f66f4d81325abe69f (diff)
downloadlinux-ef24f97daac4d9450c956ab165d8337c2feca0e9.tar.bz2
mtd: rawnand: Separate the ECC engine type and the ECC byte placement
The use of "syndrome" placement should not be encoded in the ECC engine mode/type. Create a "placement" field in NAND chip and change all occurrences of the NAND_ECC_HW_SYNDROME enumeration to be just NAND_ECC_HW and possibly a placement entry like NAND_ECC_PLACEMENT_INTERLEAVED. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-10-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/r852.c')
-rw-r--r--drivers/mtd/nand/raw/r852.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c
index f865e3a47b01..f0988cda4479 100644
--- a/drivers/mtd/nand/raw/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
@@ -859,7 +859,8 @@ static int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
chip->legacy.write_buf = r852_write_buf;
/* ecc */
- chip->ecc.mode = NAND_ECC_HW_SYNDROME;
+ chip->ecc.mode = NAND_ECC_HW;
+ chip->ecc.placement = NAND_ECC_PLACEMENT_INTERLEAVED;
chip->ecc.size = R852_DMA_LEN;
chip->ecc.bytes = SM_OOB_SIZE;
chip->ecc.strength = 2;