Commit bb779acf authored by Markus Schuetterle's avatar Markus Schuetterle Committed by Chris Ball
Browse files

mmc-utils: Add disable partition boot to 'mmc bootpart enable'



Modified 'bootpart enable' function to disable partition boot
by setting the <partition> parameter to 0.
Signed-off-by: default avatarMarkus Schuetterle <markus.schuetterle@intel.com>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent 89cd01ed
......@@ -52,6 +52,7 @@ Print the response to STATUS_SEND (CMD13).
.TP
.BR "bootpart enable <boot_partition> <send_ack> <device>"
Enable the boot partition for the <device>.
Disable the boot partition for the <device> with <boot_partition> set to 0.
To receive acknowledgment of boot from the card set <send_ack>
to 1, else set it to 0.
.TP
......
......@@ -95,7 +95,7 @@ static struct Command commands[] = {
},
{ do_write_boot_en, -3,
"bootpart enable", "<boot_partition> " "<send_ack> " "<device>\n"
"Enable the boot partition for the <device>.\nTo receive acknowledgment of boot from the card set <send_ack>\nto 1, else set it to 0.",
"Enable the boot partition for the <device>.\nDisable the boot partition for the <device> if <boot_partition> is set to 0.\nTo receive acknowledgment of boot from the card set <send_ack>\nto 1, else set it to 0.",
NULL
},
{ do_boot_bus_conditions_set, -4,
......
......@@ -150,6 +150,7 @@
#define EXT_CSD_HW_RESET_EN (0x01)
#define EXT_CSD_HW_RESET_DIS (0x02)
#define EXT_CSD_PART_CONFIG_ACC_MASK (0x7)
#define EXT_CSD_PART_CONFIG_ACC_NONE (0x0)
#define EXT_CSD_PART_CONFIG_ACC_BOOT0 (0x1)
#define EXT_CSD_PART_CONFIG_ACC_BOOT1 (0x2)
#define EXT_CSD_PART_CONFIG_ACC_USER_AREA (0x7)
......
......@@ -275,6 +275,9 @@ int do_write_boot_en(int nargs, char **argv)
value = ext_csd[EXT_CSD_PART_CONFIG];
switch (boot_area) {
case EXT_CSD_PART_CONFIG_ACC_NONE:
value &= ~(7 << 3);
break;
case EXT_CSD_PART_CONFIG_ACC_BOOT0:
value |= (1 << 3);
value &= ~(3 << 4);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment