aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-12-25 04:18:55 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-01-20 14:23:28 -0500
commit94d04e824fc879f66d1a8f7c9689b85159e3f24e (patch)
treed649ce3add5591db0f879ffc79c3e4e1bfe482f4 /drivers
parent3db227b64841383b0e3c00d02e7c84d363494281 (diff)
mtd: nand: add support for Samsung K9LCG08U0B
Assume that: tmp = ((extid >> 2) & 0x04) | (extid & 0x03)); From the K9LCG08U0B's datasheet, we know that: the oob size is 640 when tmp is 6; the oob size is 1024 when tmp is 7; Signed-off-by: Huang Shijie <b32955@freescale.com> [Brian: fixed compile issue] Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_base.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d388c7f6fec9..59eba5d2c685 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3285,9 +3285,12 @@ static void nand_decode_ext_id(struct mtd_info *mtd, struct nand_chip *chip,
3285 mtd->oobsize = 512; 3285 mtd->oobsize = 512;
3286 break; 3286 break;
3287 case 6: 3287 case 6:
3288 default: /* Other cases are "reserved" (unknown) */
3289 mtd->oobsize = 640; 3288 mtd->oobsize = 640;
3290 break; 3289 break;
3290 case 7:
3291 default: /* Other cases are "reserved" (unknown) */
3292 mtd->oobsize = 1024;
3293 break;
3291 } 3294 }
3292 extid >>= 2; 3295 extid >>= 2;
3293 /* Calc blocksize */ 3296 /* Calc blocksize */