mmc-utils: Add blockprotect command set

This patch adds a group of commands that allow controlling an eMMC's
user partition write-protect features, which allow temporary, permanent
or until-next-power-on write-protection of a write-protect block (which
is a device-dependent multiple of an erase block).

TEST=Manual enabling, disabling and writing of a bunch of blocks on my

Change-Id: I75ff069f7f9cf94cdb3adfa0a5f4574f912cad9f
Signed-off-by: Julius Werner <>
Reviewed-by: Gwendal Grignou <>
4 files changed