From e6fa5a546154a42c4f6662cd8890c238207ce21a Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Thu, 4 Jan 2018 15:23:34 +0100 Subject: mmc: compile out erase and write mmc commands if write operations are not enabled Also remove erase_grp_size and write_bl_len from struct mmc as they are not used anymore. On ARM, removing them saves about 100 bytes of code space in SPL. Signed-off-by: Jean-Jacques Hiblot --- include/mmc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/mmc.h b/include/mmc.h index f50c7144284..3abeb581aef 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -585,8 +585,10 @@ struct mmc { uint tran_speed; uint legacy_speed; /* speed for the legacy mode provided by the card */ uint read_bl_len; +#if CONFIG_IS_ENABLED(MMC_WRITE) uint write_bl_len; uint erase_grp_size; /* in 512-byte sectors */ +#endif uint hc_wp_grp_size; /* in 512-byte sectors */ #if CONFIG_IS_ENABLED(MMC_WRITE) struct sd_ssr ssr; /* SD status register */ -- cgit v1.3.1