mtd: nand: add support for Samsung K9LCG08U0B

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jan 28 00:59:07 EST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=94d04e824fc879f66d1a8f7c9689b85159e3f24e
Commit:     94d04e824fc879f66d1a8f7c9689b85159e3f24e
Parent:     3db227b64841383b0e3c00d02e7c84d363494281
Author:     Huang Shijie <b32955 at freescale.com>
AuthorDate: Wed Dec 25 17:18:55 2013 +0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Jan 20 11:23:28 2014 -0800

    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 at freescale.com>
    [Brian: fixed compile issue]
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/nand_base.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d388c7f..59eba5d 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,
 			mtd->oobsize = 512;
 			break;
 		case 6:
-		default: /* Other cases are "reserved" (unknown) */
 			mtd->oobsize = 640;
 			break;
+		case 7:
+		default: /* Other cases are "reserved" (unknown) */
+			mtd->oobsize = 1024;
+			break;
 		}
 		extid >>= 2;
 		/* Calc blocksize */



More information about the linux-mtd-cvs mailing list