diff options
author | Boris Brezillon <bbrezillon@kernel.org> | 2020-05-03 17:53:39 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-11 09:51:42 +0200 |
commit | 1998053c8e80a22cf84f40dfea689bb5a94cddfa (patch) | |
tree | 7001abdedff6cdfe9500c834bd6ad89738a15155 /drivers/mtd/parsers | |
parent | 422928a040fe17d17ded69c57903c7908423c7ef (diff) |
mtd: partitions: ofpart: Parse the slc-mode property
Parse the slc-mode property and set the MTD_MLC_IN_SLC_MODE flag
when present.
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200503155341.16712-7-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/parsers')
-rw-r--r-- | drivers/mtd/parsers/ofpart.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/parsers/ofpart.c b/drivers/mtd/parsers/ofpart.c index 3caeabf27987..daf507c123e6 100644 --- a/drivers/mtd/parsers/ofpart.c +++ b/drivers/mtd/parsers/ofpart.c @@ -117,6 +117,9 @@ static int parse_fixed_partitions(struct mtd_info *master, if (of_get_property(pp, "lock", &len)) parts[i].mask_flags |= MTD_POWERUP_LOCK; + if (of_property_read_bool(pp, "slc-mode")) + parts[i].add_flags |= MTD_SLC_ON_MLC_EMULATION; + i++; } |