diff mbox series

[U-Boot,v1,09/10] mmc: don't read the size of eMMC enhanced user data area in SPL

Message ID 1513857247-15821-10-git-send-email-jjhiblot@ti.com
State Superseded
Delegated to: Jaehoon Chung
Headers show
Series reduce the size of the mmc core | expand

Commit Message

Jean-Jacques Hiblot Dec. 21, 2017, 11:53 a.m. UTC
This information is only used by the "mmc info" command.
On ARM removing this information from SPL saves about 140 of code space.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---

 drivers/mmc/mmc.c | 2 ++
 include/mmc.h     | 2 ++
 2 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 531c098..64c7479 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2010,6 +2010,7 @@  static int mmc_startup_v4(struct mmc *mmc)
 		mmc->capacity_gp[i] <<= 19;
 	}
 
+#ifndef CONFIG_SPL_BUILD
 	if (part_completed) {
 		mmc->enh_user_size =
 			(ext_csd[EXT_CSD_ENH_SIZE_MULT + 2] << 16) +
@@ -2026,6 +2027,7 @@  static int mmc_startup_v4(struct mmc *mmc)
 		if (mmc->high_capacity)
 			mmc->enh_user_start <<= 9;
 	}
+#endif
 
 	/*
 	 * Host needs to enable ERASE_GRP_DEF bit if device is
diff --git a/include/mmc.h b/include/mmc.h
index 3abeb58..cd068b9 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -598,8 +598,10 @@  struct mmc {
 	u64 capacity_boot;
 	u64 capacity_rpmb;
 	u64 capacity_gp[4];
+#ifndef CONFIG_SPL_BUILD
 	u64 enh_user_start;
 	u64 enh_user_size;
+#endif
 #if !CONFIG_IS_ENABLED(BLK)
 	struct blk_desc block_dev;
 #endif