mtd: gpmi: update the bitflip_threshold
authorHuang Shijie <b32955@freescale.com>
Tue, 3 Jul 2012 08:24:33 +0000 (16:24 +0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 17 Jul 2012 13:48:09 +0000 (14:48 +0100)
The origin code misses to update the bitflip_threshold when
we have already get the right ecc_strength.

The patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c

index 5d9796acc49a280ca80787e4b45bd809db13b52a..9da9ee88a824ce8a781efddc762256962d6c4e64 100644 (file)
@@ -1442,6 +1442,7 @@ static int gpmi_pre_bbt_scan(struct gpmi_nand_data  *this)
        /* Adjust the ECC strength according to the chip. */
        this->nand.ecc.strength = this->bch_geometry.ecc_strength;
        this->mtd.ecc_strength = this->bch_geometry.ecc_strength;
+       this->mtd.bitflip_threshold = this->bch_geometry.ecc_strength;
 
        /* NAND boot init, depends on the gpmi_set_geometry(). */
        return nand_boot_init(this);