mtd: ofpart: Replicate mtd cmdline "lk" option with device tree "lock" property
authorJosh Radel <jradel@gmail.com>
Wed, 14 Nov 2012 22:11:32 +0000 (14:11 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 22 Nov 2012 08:14:22 +0000 (10:14 +0200)
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>
drivers/mtd/ofpart.c

index d9127e2ed808eab6ddfe5835c68cfa88ef490cf0..dbd3aa574eaf8462b9bce810ba9742c9c48f2eb2 100644 (file)
@@ -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++;
        }
This page took 0.024451 seconds and 5 git commands to generate.