diff options
author | Mario Schuknecht <mario.schuknecht@dresearch-fe.de> | 2013-05-15 08:28:04 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 10:34:27 -0400 |
commit | 8c0c40d477db2863e2746e6a995980113f725c0d (patch) | |
tree | 1aa8af99dc871be94031e7dccff1968750cf0a63 | |
parent | 21bb473fc58366b872efe31e1da7831cad4b92fa (diff) | |
download | mmc-utils-8c0c40d477db2863e2746e6a995980113f725c0d.tar.gz |
mmc-utils: small fixes of output
Improve "extcsd read" output of the registers.
Right-shift by 3 of EXT_CSD_BOOT_CFG_EN bits.
Expand the EXT_CSD_BOOT_CFG_ACC bit mask to 0x7.
Add case 3 RPMB partition.
Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | mmc.h | 2 | ||||
-rw-r--r-- | mmc_cmds.c | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -71,7 +71,7 @@ #define EXT_CSD_BOOT_INFO_ALT (1<<0) #define EXT_CSD_BOOT_CFG_ACK (1<<6) #define EXT_CSD_BOOT_CFG_EN (0x38) -#define EXT_CSD_BOOT_CFG_ACC (0x03) +#define EXT_CSD_BOOT_CFG_ACC (0x07) #define EXT_CSD_RST_N_EN_MASK (0x03) #define EXT_CSD_HW_RESET_EN (0x01) #define EXT_CSD_HW_RESET_DIS (0x02) @@ -613,7 +613,7 @@ int do_read_extcsd(int nargs, char **argv) ext_csd[181]); reg = ext_csd[EXT_CSD_BOOT_CFG]; printf("Boot configuration bytes [PARTITION_CONFIG: 0x%02x]\n", reg); - switch (reg & EXT_CSD_BOOT_CFG_EN) { + switch ((reg & EXT_CSD_BOOT_CFG_EN)>>3) { case 0x0: printf(" Not boot enable\n"); break; @@ -637,8 +637,11 @@ int do_read_extcsd(int nargs, char **argv) case 0x2: printf(" R/W Boot Partition 2\n"); break; + case 0x3: + printf(" R/W Replay Protected Memory Block (RPMB)\n"); + break; default: - printf(" Access to General Purpuse partition %d\n", + printf(" Access to General Purpose partition %d\n", (reg & EXT_CSD_BOOT_CFG_ACC) - 3); break; } |