aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 02:58:13 -0400
committerBrian Norris <computersforpeace@gmail.com>2013-10-27 19:27:05 -0400
commit13fbd17941db6af61337d909fd09b9c7f7634632 (patch)
tree9c73082dd5ae37a82bcd725c1dd1b8a9ef2294f7 /drivers/mtd/nand/nand_base.c
parent1c195e909cbe335b02a5dd01075ba65448927ae6 (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>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-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 aebc7ea9f379..137d6c501f19 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2992,6 +2992,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2992 mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page); 2992 mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page);
2993 chip->chipsize = le32_to_cpu(p->blocks_per_lun); 2993 chip->chipsize = le32_to_cpu(p->blocks_per_lun);
2994 chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count; 2994 chip->chipsize *= (uint64_t)mtd->erasesize * p->lun_count;
2995 chip->bits_per_cell = p->bits_per_cell;
2995 2996
2996 if (onfi_feature(chip) & ONFI_FEATURE_16_BIT_BUS) 2997 if (onfi_feature(chip) & ONFI_FEATURE_16_BIT_BUS)
2997 *busw = NAND_BUSWIDTH_16; 2998 *busw = NAND_BUSWIDTH_16;