mmc-utils: Enable/Disable write protect

In secure write protected mode, the updatability of USER_WP[171],
BOOT_WP[173], TMP_WRITE_PROTECT[12] and PERM_WRITE_PROTECT[13] are
controlled by SECURE_WP_MASK bit in the SECURE _WP_MODE_CONFIG of the
Authenticated Device Configuration Area.

Setting it, enables updating WP related EXT_CSD and CSD fields, and
clearing it vice versa.

Access to the Authenticated Device Configuration Area is regulated via
Authenticated Device Configuration Write Request.

Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20250407082833.108616-9-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3 files changed