summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-12-11 10:48:19 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-12-11 10:57:46 +0100
commit6748f466a3c85a3a776fe8ae64acbed5d803d829 (patch)
treec0bd4ae0601573e5536f017a48c2be276521f21b /drivers/mtd/nand/nand_base.c
parent8c3ba6f91c4dd41df066854824ee231d556e8358 (diff)
downloadbarebox-6748f466a3c85a3a776fe8ae64acbed5d803d829.tar.gz
barebox-6748f466a3c85a3a776fe8ae64acbed5d803d829.tar.xz
mtd: nand: Make support for syndrome hardware ecc optional
NAND_ECC_HW_SYNDROME is currently not needed by the drivers in barebox, so make support for it optional again. This has been optional before the last NAND layer update, just re-add the option. This time drop the "default y", as this option shouldn't be needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 2c3c0b360f..0a980e4499 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -5574,6 +5574,10 @@ int nand_scan_tail(struct nand_chip *chip)
if (!ecc->write_subpage && ecc->hwctl && ecc->calculate)
ecc->write_subpage = nand_write_subpage_hwecc;
case NAND_ECC_HW_SYNDROME:
+ if (!IS_ENABLED(CONFIG_NAND_ECC_HW_SYNDROME)) {
+ ret = -ENOSYS;
+ goto err_nand_manuf_cleanup;
+ }
if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) &&
(!ecc->read_page ||
ecc->read_page == nand_read_page_hwecc ||