Commit 9e41a00b572f415bbcc3d8f6fb1c6c541293655b

Authored by Diego Santa Cruz
Committed by Pantelis Antoniou
1 parent 189f963ac8

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

... ... @@ -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 }
... ... @@ -1306,6 +1306,8 @@
1306 1306 mmc->hc_wp_grp_size = 1024
1307 1307 * ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
1308 1308 * ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
  1309 +
  1310 + mmc->wr_rel_set = ext_csd[EXT_CSD_WR_REL_SET];
1309 1311 }
1310 1312  
1311 1313 err = mmc_set_capacity(mmc, mmc->part_num);
... ... @@ -318,6 +318,7 @@
318 318 ushort rca;
319 319 u8 part_support;
320 320 u8 part_attr;
  321 + u8 wr_rel_set;
321 322 char part_config;
322 323 char part_num;
323 324 uint tran_speed;