summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJosh Radel <jradel@gmail.com>2012-11-14 14:11:32 -0800
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-11-22 10:14:22 +0200
commitab0b00bc6ebcfbff42dedb3bf53f0ece79b27e88 (patch)
tree7a82a6de10c0a9c87d13e3c7470d3a746ae2733b /drivers/mtd
parent9b7ef60ce15c5f668c0da30a39ed9b315d3d7ff0 (diff)
downloadblackbird-op-linux-ab0b00bc6ebcfbff42dedb3bf53f0ece79b27e88.tar.gz
blackbird-op-linux-ab0b00bc6ebcfbff42dedb3bf53f0ece79b27e88.zip
mtd: ofpart: Replicate mtd cmdline "lk" option with device tree "lock" property
The mtd partition command line parser already supports a "lk" option to mask MTD_POWERUP_LOCK. This extends that same functionality to device tree partition specifications. Signed-off-by: Josh Radel <jradel@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ofpart.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index d9127e2ed808..dbd3aa574eaf 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -71,7 +71,10 @@ static int parse_ofpart_partitions(struct mtd_info *master,
(*pparts)[i].name = (char *)partname;
if (of_get_property(pp, "read-only", &len))
- (*pparts)[i].mask_flags = MTD_WRITEABLE;
+ (*pparts)[i].mask_flags |= MTD_WRITEABLE;
+
+ if (of_get_property(pp, "lock", &len))
+ (*pparts)[i].mask_flags |= MTD_POWERUP_LOCK;
i++;
}
OpenPOWER on IntegriCloud