diff options
| -rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 95f2af848ff0..3eafc68154ed 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
| @@ -1424,6 +1424,10 @@ static int gpmi_pre_bbt_scan(struct gpmi_nand_data *this) | |||
| 1424 | if (ret) | 1424 | if (ret) |
| 1425 | return ret; | 1425 | return ret; |
| 1426 | 1426 | ||
| 1427 | /* Adjust the ECC strength according to the chip. */ | ||
| 1428 | this->nand.ecc.strength = this->bch_geometry.ecc_strength; | ||
| 1429 | this->mtd.ecc_strength = this->bch_geometry.ecc_strength; | ||
| 1430 | |||
| 1427 | /* NAND boot init, depends on the gpmi_set_geometry(). */ | 1431 | /* NAND boot init, depends on the gpmi_set_geometry(). */ |
| 1428 | return nand_boot_init(this); | 1432 | return nand_boot_init(this); |
| 1429 | } | 1433 | } |
| @@ -1482,6 +1486,7 @@ static int __devinit gpmi_nfc_init(struct gpmi_nand_data *this) | |||
| 1482 | chip->options |= NAND_NO_SUBPAGE_WRITE; | 1486 | chip->options |= NAND_NO_SUBPAGE_WRITE; |
| 1483 | chip->ecc.mode = NAND_ECC_HW; | 1487 | chip->ecc.mode = NAND_ECC_HW; |
| 1484 | chip->ecc.size = 1; | 1488 | chip->ecc.size = 1; |
| 1489 | chip->ecc.strength = 8; | ||
| 1485 | chip->ecc.layout = &gpmi_hw_ecclayout; | 1490 | chip->ecc.layout = &gpmi_hw_ecclayout; |
| 1486 | 1491 | ||
| 1487 | /* Allocate a temporary DMA buffer for reading ID in the nand_scan() */ | 1492 | /* Allocate a temporary DMA buffer for reading ID in the nand_scan() */ |
