mtd: nand: add the "bits per cell" info for legacy ID NAND
authorHuang Shijie <b32955@freescale.com>
Wed, 25 Sep 2013 06:58:12 +0000 (14:58 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Sun, 27 Oct 2013 23:27:05 +0000 (16:27 -0700)
The legacy ID NAND are all SLC.
This patch sets 1 to the @bits_per_cell for the legacy ID NAND,
which means they are all SLC.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c

index 5fb00957fd25a62f1ac43056d2fc2d5e9af8e86c..aebc7ea9f379491d8d0e1ef10d2ffc7065181a0b 100644 (file)
@@ -3238,6 +3238,9 @@ static void nand_decode_id(struct mtd_info *mtd, struct nand_chip *chip,
        mtd->oobsize = mtd->writesize / 32;
        *busw = type->options & NAND_BUSWIDTH_16;
 
+       /* All legacy ID NAND are small-page, SLC */
+       chip->bits_per_cell = 1;
+
        /*
         * Check for Spansion/AMD ID + repeating 5th, 6th byte since
         * some Spansion chips have erasesize that conflicts with size