diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-06-10 15:49:06 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-06-18 09:45:21 +0200 |
commit | c06dd49fd59a0abd6fa3d9fc5f6eb1776af4e5e4 (patch) | |
tree | 0f5a7d99b308b7f09ed7c33d06d950cbb7bf9691 /drivers/mtd/nand/raw/omap_elm.c | |
parent | 496030b1b71e2129ce2cf1411f18ee55ec305ab6 (diff) |
mtd: rawnand: omap: Add larger page NAND chips support
There is no reason to be limited to 4kiB page NAND chips just because
this is the maximum length the ELM is able to handle in one go. Just
call the ELM several times and it will process as many data as needed.
Here we introduce the concept of ECC page (which is at most 4kiB). The
ELM will be sought as many times as there are ECC pages.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Ryan Barnett <ryan.barnett@collins.com>
Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-6-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/omap_elm.c')
-rw-r--r-- | drivers/mtd/nand/raw/omap_elm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c index 550695a4c1ab..2b21ce04b3ec 100644 --- a/drivers/mtd/nand/raw/omap_elm.c +++ b/drivers/mtd/nand/raw/omap_elm.c @@ -116,7 +116,7 @@ int elm_config(struct device *dev, enum bch_ecc bch_type, return -EINVAL; } /* ELM support 8 error syndrome process */ - if (ecc_steps > ERROR_VECTOR_MAX) { + if (ecc_steps > ERROR_VECTOR_MAX && ecc_steps % ERROR_VECTOR_MAX) { dev_err(dev, "unsupported config ecc-step=%d\n", ecc_steps); return -EINVAL; } |