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: Markus Schuetterle <markus.schuetterle@intel.com> Signed-off-by: Chris Ball <chris@printf.net>
This commit is contained in:
1 parent
89cd01ed86
commit
bb779acfc3
4 files changed
+6
-1
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user