]> www.infradead.org Git - mtd-utils.git/commitdiff
add the MTD_MLCNANDFLASH case
authorHuang Shijie <b32955@freescale.com>
Tue, 20 Aug 2013 05:58:34 +0000 (13:58 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 22 Oct 2013 23:17:52 +0000 (16:17 -0700)
The MTD_MLCNANDFLASH case is missed in the current code.
This patch adds it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
lib/libmtd.c
lib/libmtd_legacy.c
mtd_debug.c

index 654490edbee9c64246e2d1cd24c027f4ba1203e4..3e8109aa6c8a0a2de46aa742925b2ae681cde0bf 100644 (file)
@@ -403,6 +403,8 @@ static int type_str2int(const char *str)
 {
        if (!strcmp(str, "nand"))
                return MTD_NANDFLASH;
+       if (!strcmp(str, "mlc-nand"))
+               return MTD_MLCNANDFLASH;
        if (!strcmp(str, "nor"))
                return MTD_NORFLASH;
        if (!strcmp(str, "rom"))
index 1ae99464505b76502794e7cb988e17ffdac49df1..233a92ebaf6e750986105ad293398c1e4221b8a5 100644 (file)
@@ -322,6 +322,9 @@ int legacy_get_dev_info(const char *node, struct mtd_dev_info *mtd)
        case MTD_NANDFLASH:
                strcpy((char *)mtd->type_str, "nand");
                break;
+       case MTD_MLCNANDFLASH:
+               strcpy((char *)mtd->type_str, "mlc-nand");
+               break;
        case MTD_DATAFLASH:
                strcpy((char *)mtd->type_str, "dataflash");
                break;
index 9110e9b4827ce97563dd808bd853f220b51bcc23..d6993cec2d5475b8fb9475c8f1dd0b72594c3bc2 100644 (file)
@@ -260,6 +260,9 @@ int showinfo(int fd)
                case MTD_NANDFLASH:
                        printf("MTD_NANDFLASH");
                        break;
+               case MTD_MLCNANDFLASH:
+                       printf("MTD_MLCNANDFLASH");
+                       break;
                case MTD_DATAFLASH:
                        printf("MTD_DATAFLASH");
                        break;