Commit 9e41a00b572f415bbcc3d8f6fb1c6c541293655b
Committed by
Pantelis Antoniou
1 parent
189f963ac8
Exists in
v2017.01-smarct4x
and in
37 other branches
mmc: extend mmcinfo output to show partition write reliability settings
This extends the mmcinfo hardware partition info output to show partitions with write reliability enabled with the "WRREL" string. If the partition does not have write reliability enabled the "WRREL" string is omitted; this is analogous to the ehhanced attribute. Example output: Device: OMAP SD/MMC Manufacturer ID: fe OEM: 14e Name: MMC16 Tran Speed: 52000000 Rd Block Len: 512 MMC version 4.41 High Capacity: Yes Capacity: 13.8 GiB Bus Width: 4-bit Erase Group Size: 8 MiB HC WP Group Size: 16 MiB User Capacity: 13.8 GiB ENH WRREL User Enhanced Start: 0 Bytes User Enhanced Size: 512 MiB Boot Capacity: 16 MiB ENH RPMB Capacity: 128 KiB ENH GP1 Capacity: 64 MiB ENH WRREL GP2 Capacity: 64 MiB ENH WRREL Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Showing 3 changed files with 13 additions and 2 deletions Side-by-side Diff
common/cmd_mmc.c
... | ... | @@ -106,7 +106,11 @@ |
106 | 106 | print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n"); |
107 | 107 | |
108 | 108 | puts("User Capacity: "); |
109 | - print_size(mmc->capacity_user, usr_enh ? " ENH\n" : "\n"); | |
109 | + print_size(mmc->capacity_user, usr_enh ? " ENH" : ""); | |
110 | + if (mmc->wr_rel_set & EXT_CSD_WR_DATA_REL_USR) | |
111 | + puts(" WRREL\n"); | |
112 | + else | |
113 | + putc('\n'); | |
110 | 114 | if (usr_enh) { |
111 | 115 | puts("User Enhanced Start: "); |
112 | 116 | print_size(mmc->enh_user_start, "\n"); |
... | ... | @@ -124,7 +128,11 @@ |
124 | 128 | if (mmc->capacity_gp[i]) { |
125 | 129 | printf("GP%i Capacity: ", i+1); |
126 | 130 | print_size(mmc->capacity_gp[i], |
127 | - is_enh ? " ENH\n" : "\n"); | |
131 | + is_enh ? " ENH" : ""); | |
132 | + if (mmc->wr_rel_set & EXT_CSD_WR_DATA_REL_GP(i)) | |
133 | + puts(" WRREL\n"); | |
134 | + else | |
135 | + putc('\n'); | |
128 | 136 | } |
129 | 137 | } |
130 | 138 | } |
drivers/mmc/mmc.c