Commit 09ec417b authored by Ladislav Michl's avatar Ladislav Michl Committed by Boris Brezillon

mtd: nand: samsung: Disable subpage writes on E-die NAND

Samsung E-die SLC NAND manufactured using 21nm process (K9F1G08U0E)
does not support partial page programming, so disable subpage writes
for it. Manufacturing process is stored in lowest two bits of 5th ID
byte.
Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 6cbefbdc
...@@ -92,10 +92,23 @@ static void samsung_nand_decode_id(struct nand_chip *chip) ...@@ -92,10 +92,23 @@ static void samsung_nand_decode_id(struct nand_chip *chip)
} else { } else {
nand_decode_ext_id(chip); nand_decode_ext_id(chip);
/* Datasheet values for SLC Samsung K9F4G08U0D-S[I|C]B0(T00) */ if (nand_is_slc(chip)) {
if (nand_is_slc(chip) && chip->id.data[1] == 0xDC) { switch (chip->id.data[1]) {
/* K9F4G08U0D-S[I|C]B0(T00) */
case 0xDC:
chip->ecc_step_ds = 512; chip->ecc_step_ds = 512;
chip->ecc_strength_ds = 1; chip->ecc_strength_ds = 1;
break;
/* K9F1G08U0E 21nm chips do not support subpage write */
case 0xF1:
if (chip->id.len > 4 &&
(chip->id.data[4] & GENMASK(1, 0)) == 0x1)
chip->options |= NAND_NO_SUBPAGE_WRITE;
break;
default:
break;
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment