Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab0b00bc authored by Josh Radel's avatar Josh Radel Committed by Artem Bityutskiy
Browse files

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: default avatarJosh Radel <jradel@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 9b7ef60c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,10 @@ static int parse_ofpart_partitions(struct mtd_info *master,
		(*pparts)[i].name = (char *)partname;
		(*pparts)[i].name = (char *)partname;


		if (of_get_property(pp, "read-only", &len))
		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++;
		i++;
	}
	}