Passing bootpart argument as 0 will cause the BOOT_ACK (Bit[6]) and
BOOT_PARTITION_ENABLE (Bit[5:3]) to be set back to the device default.
---
 mmc.h      |    1 +
 mmc_cmds.c |    3 +++
 2 files changed, 4 insertions(+)

diff --git a/mmc.h b/mmc.h
index 9871d62..1127d75 100644
--- a/mmc.h
+++ b/mmc.h
@@ -99,6 +99,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_NO_BOOT          (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)
diff --git a/mmc_cmds.c b/mmc_cmds.c
index b8afa74..af6f09f 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -280,6 +280,9 @@ int do_write_boot_en(int nargs, char **argv)
        case EXT_CSD_PART_CONFIG_ACC_USER_AREA:
                value |= (boot_area << 3);
                break;
+       case EXT_CSD_PART_CONFIG_ACC_NO_BOOT:
+               value &= 0x87; /* Zero out Bit[6] and Bit[5:3] */
+               break;
        default:
                fprintf(stderr, "Cannot enable the boot area\n");
                exit(1);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to