aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 02:58:13 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:06:04 -0400
commit12944c9978e0016ea98496584ad62802bd9c233b (patch)
tree6607823cfee1b36503b3ef732ac857f4e4a6ca36
parent6f37e5e3df4a1105fc2da954605dff33b7d65ae2 (diff)
mtd: nand: set the cell information for ONFI nand
The current code does not set the SLC/MLC information for onfi nand. (This makes that the kernel treats all the onfi nand as SLC nand.) This patch fills the cell information for ONFI nands. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/nand/nand_base.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d9d2097f37bc..01bdb3bbecb7 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3003,6 +3003,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
3003 /* See erasesize comment */ 3003 /* See erasesize comment */
3004 chip->chipsize = 1 << (fls(le32_to_cpu(p->blocks_per_lun)) - 1); 3004 chip->chipsize = 1 << (fls(le32_to_cpu(p->blocks_per_lun)) - 1);
3005 chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count; 3005 chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count;
3006 chip->bits_per_cell = p->bits_per_cell;
3006 3007
3007 if (onfi_feature(chip) & ONFI_FEATURE_16_BIT_BUS) 3008 if (onfi_feature(chip) & ONFI_FEATURE_16_BIT_BUS)
3008 *busw = NAND_BUSWIDTH_16; 3009 *busw = NAND_BUSWIDTH_16;