aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorVladimir Zahradnik <vladimir.zahradnik@gmail.com>2016-12-25 00:20:17 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-06 15:34:13 +0100
commitf277f45bd682f82aa7ac69f68abd1835730289af (patch)
treeadcaf2c5d3b650cccabd0cb17251d835a5dd61f1 /target/linux/generic
parentd8dde8c5178eba8c847dd48e7d06e6663ba1979f (diff)
downloadupstream-f277f45bd682f82aa7ac69f68abd1835730289af.tar.gz
upstream-f277f45bd682f82aa7ac69f68abd1835730289af.tar.bz2
upstream-f277f45bd682f82aa7ac69f68abd1835730289af.zip
yaffs: fix to detect MLC/TLC NAND flash
Signed-off-by: Vladimir Zahradnik <vladimir.zahradnik@gmail.com>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/fs/yaffs2/yaffs_mtdif.c2
-rw-r--r--target/linux/generic/files/fs/yaffs2/yaffs_vfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/files/fs/yaffs2/yaffs_mtdif.c b/target/linux/generic/files/fs/yaffs2/yaffs_mtdif.c
index 7c01461ab9..d15c660638 100644
--- a/target/linux/generic/files/fs/yaffs2/yaffs_mtdif.c
+++ b/target/linux/generic/files/fs/yaffs2/yaffs_mtdif.c
@@ -259,7 +259,7 @@ struct mtd_info * yaffs_get_mtd_device(dev_t sdev)
return NULL; /* This isn't an mtd device */
/* Check it's NAND */
- if (mtd->type != MTD_NANDFLASH) {
+ if (mtd->type != MTD_NANDFLASH && mtd->type != MTD_MLCNANDFLASH) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"yaffs: MTD device is not NAND it's type %d",
mtd->type);
diff --git a/target/linux/generic/files/fs/yaffs2/yaffs_vfs.c b/target/linux/generic/files/fs/yaffs2/yaffs_vfs.c
index 864a5dc185..73dcc3ca8c 100644
--- a/target/linux/generic/files/fs/yaffs2/yaffs_vfs.c
+++ b/target/linux/generic/files/fs/yaffs2/yaffs_vfs.c
@@ -2598,7 +2598,7 @@ static int yaffs_remount_fs(struct super_block *sb, int *flags, char *data)
}
/* Check it's NAND */
- if (mtd->type != MTD_NANDFLASH) {
+ if (mtd->type != MTD_NANDFLASH && mtd->type != MTD_MLCNANDFLASH) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"MTD device is not NAND it's type %d",
mtd->type);