summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-10-30 14:22:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-09 23:04:01 +0100
commitcb88601b4eea72ea99d1278aef60e5620f06df95 (patch)
tree254d21575950c3e815b5c518756621875f2236fc
parent43a51ad3c2569455def9d10ac5e2708720195fb0 (diff)
downloadbarebox-cb88601b4eea72ea99d1278aef60e5620f06df95.tar.gz
barebox-cb88601b4eea72ea99d1278aef60e5620f06df95.tar.xz
mtd: Add ecc_step_size
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mtd/partition.c1
-rw-r--r--include/linux/mtd/mtd.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/partition.c b/drivers/mtd/partition.c
index 917122a844..1572038392 100644
--- a/drivers/mtd/partition.c
+++ b/drivers/mtd/partition.c
@@ -166,6 +166,7 @@ struct mtd_info *mtd_add_partition(struct mtd_info *mtd, off_t offset,
part->oobavail = mtd->oobavail;
part->bitflip_threshold = mtd->bitflip_threshold;
part->ecclayout = mtd->ecclayout;
+ part->ecc_step_size = mtd->ecc_step_size;
part->ecc_strength = mtd->ecc_strength;
part->subpage_sft = mtd->subpage_sft;
part->cdev.flags = flags;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 75407a9790..710cba7a20 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -124,6 +124,9 @@ struct mtd_info {
/* ecc layout structure pointer - read only ! */
struct nand_ecclayout *ecclayout;
+ /* the ecc step size. */
+ unsigned int ecc_step_size;
+
/* max number of correctible bit errors per ecc step */
unsigned int ecc_strength;