From: Boris Brezillon Date: Sun, 3 May 2020 15:53:39 +0000 (+0200) Subject: mtd: partitions: ofpart: Parse the slc-mode property X-Git-Tag: v5.8-rc1~68^2~5^2~143 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1998053c8e80a22cf84f40dfea689bb5a94cddfa;p=linux-block.git 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200503155341.16712-7-miquel.raynal@bootlin.com --- 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++; }