提交 ab0b00bc 编写于 作者: J Josh Radel 提交者: Artem Bityutskiy

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: NJosh Radel <jradel@gmail.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
上级 9b7ef60c
......@@ -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++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册