summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/mmc.c2
-rw-r--r--drivers/mmc/mmc.c2
-rw-r--r--include/mmc.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 65601d82c3..58fdc36f08 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -54,8 +54,10 @@ static void print_mmcinfo(struct mmc *mmc)
bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
bool usr_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_USR);
+#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
puts("HC WP Group Size: ");
print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n");
+#endif
puts("User Capacity: ");
print_size(mmc->capacity_user, usr_enh ? " ENH" : "");
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index c1ba57f86d..53c819187e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2098,9 +2098,11 @@ static int mmc_startup_v4(struct mmc *mmc)
* (erase_gmul + 1);
}
#endif
+#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
mmc->hc_wp_grp_size = 1024
* ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
* ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
+#endif
mmc->wr_rel_set = ext_csd[EXT_CSD_WR_REL_SET];
diff --git a/include/mmc.h b/include/mmc.h
index cd068b9429..a46eaed746 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -589,7 +589,9 @@ struct mmc {
uint write_bl_len;
uint erase_grp_size; /* in 512-byte sectors */
#endif
+#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
uint hc_wp_grp_size; /* in 512-byte sectors */
+#endif
#if CONFIG_IS_ENABLED(MMC_WRITE)
struct sd_ssr ssr; /* SD status register */
#endif