aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-08-15 22:10:06 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:06:02 -0400
commitb7ce93160e6918dcf7f41c517ad3fa23fed5d0a3 (patch)
tree98b1720d447715f4653eb423f74fb681c28a4f0d
parent3912f45ea164f4ac1d326354cc02a8fb1b723434 (diff)
mtd: set the ecc step size for master/slave mtd_info
Set the ecc step size for master/slave mtd_info{}. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/mtdpart.c1
-rw-r--r--drivers/mtd/nand/nand_base.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 301493382cd0..6e732c3820c1 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -516,6 +516,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
516 } 516 }
517 517
518 slave->mtd.ecclayout = master->ecclayout; 518 slave->mtd.ecclayout = master->ecclayout;
519 slave->mtd.ecc_step_size = master->ecc_step_size;
519 slave->mtd.ecc_strength = master->ecc_strength; 520 slave->mtd.ecc_strength = master->ecc_strength;
520 slave->mtd.bitflip_threshold = master->bitflip_threshold; 521 slave->mtd.bitflip_threshold = master->bitflip_threshold;
521 522
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 6b3ddeaed736..201123af3077 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3799,6 +3799,7 @@ int nand_scan_tail(struct mtd_info *mtd)
3799 /* propagate ecc info to mtd_info */ 3799 /* propagate ecc info to mtd_info */
3800 mtd->ecclayout = chip->ecc.layout; 3800 mtd->ecclayout = chip->ecc.layout;
3801 mtd->ecc_strength = chip->ecc.strength; 3801 mtd->ecc_strength = chip->ecc.strength;
3802 mtd->ecc_step_size = chip->ecc.size;
3802 /* 3803 /*
3803 * Initialize bitflip_threshold to its default prior scan_bbt() call. 3804 * Initialize bitflip_threshold to its default prior scan_bbt() call.
3804 * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be 3805 * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be