summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2010-11-11 16:33:34 +0800
committerScott Sweeny <scott.sweeny@timesys.com>2011-01-19 11:50:23 -0500
commit7e72e547665668b0a2ba41fc70623613884a8b65 (patch)
tree1ebb6b6a35a9bf2332086eaa28856201f4196985
parent7fc8e98bd2c13bdd897238e40d04ec661464f881 (diff)
ENGR00133595 NAND : fix the wrong position for ONFI-nand's Block-mark swapping
The ONFI nand needs the GF14. So change the block mark's position for ONFI NAND. Signed-off-by: Huang Shijie <b32955@freescale.com>
-rw-r--r--drivers/mtd/nand/gpmi-nfc/gpmi-nfc-hal-common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-hal-common.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-hal-common.c
index 1bc1d2e21e09..67c0f736f0a7 100644
--- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-hal-common.c
+++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-hal-common.c
@@ -292,7 +292,12 @@ int gpmi_nfc_set_geometry(struct gpmi_nfc_data *this)
/* Compute some important facts about chunk geometry. */
chunk_data_size_in_bits = geometry->ecc_chunk_size_in_bytes * 8;
- chunk_ecc_size_in_bits = geometry->ecc_strength * 13;
+
+ /* ONFI nand needs GF14 */
+ if (is_onfi_nand(&this->device_info))
+ chunk_ecc_size_in_bits = geometry->ecc_strength * 14;
+ else
+ chunk_ecc_size_in_bits = geometry->ecc_strength * 13;
chunk_total_size_in_bits =
chunk_data_size_in_bits + chunk_ecc_size_in_bits;