* [PATCH] mmc-utils: small fixes of output
@ 2013-05-15 6:28 Mario Schuknecht
2013-05-15 22:17 ` Jaehoon Chung
2013-06-27 14:35 ` Chris Ball
0 siblings, 2 replies; 3+ messages in thread
From: Mario Schuknecht @ 2013-05-15 6:28 UTC (permalink / raw)
To: cjb; +Cc: linux-mmc, Mario Schuknecht
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>
---
mmc.h | 2 +-
mmc_cmds.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/mmc.h b/mmc.h
index c863751..a01c079 100644
--- a/mmc.h
+++ b/mmc.h
@@ -70,7 +70,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)
diff --git a/mmc_cmds.c b/mmc_cmds.c
index b407f65..96a1cb5 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc-utils: small fixes of output
2013-05-15 6:28 [PATCH] mmc-utils: small fixes of output Mario Schuknecht
@ 2013-05-15 22:17 ` Jaehoon Chung
2013-06-27 14:35 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2013-05-15 22:17 UTC (permalink / raw)
To: Mario Schuknecht; +Cc: cjb, linux-mmc
Looks good to me.
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 05/15/2013 03:28 PM, Mario Schuknecht wrote:
> 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>
> ---
> mmc.h | 2 +-
> mmc_cmds.c | 7 +++++--
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/mmc.h b/mmc.h
> index c863751..a01c079 100644
> --- a/mmc.h
> +++ b/mmc.h
> @@ -70,7 +70,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)
> diff --git a/mmc_cmds.c b/mmc_cmds.c
> index b407f65..96a1cb5 100644
> --- a/mmc_cmds.c
> +++ b/mmc_cmds.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc-utils: small fixes of output
2013-05-15 6:28 [PATCH] mmc-utils: small fixes of output Mario Schuknecht
2013-05-15 22:17 ` Jaehoon Chung
@ 2013-06-27 14:35 ` Chris Ball
1 sibling, 0 replies; 3+ messages in thread
From: Chris Ball @ 2013-06-27 14:35 UTC (permalink / raw)
To: Mario Schuknecht; +Cc: linux-mmc
Hi,
On Wed, May 15 2013, Mario Schuknecht wrote:
> 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>
Thanks, pushed to mmc-utils.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-27 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 6:28 [PATCH] mmc-utils: small fixes of output Mario Schuknecht
2013-05-15 22:17 ` Jaehoon Chung
2013-06-27 14:35 ` Chris Ball
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.