[U-Boot] [PATCH v1 00/10] reduce the size of the mmc core

Jean-Jacques Hiblot jjhiblot at ti.com
Thu Dec 21 11:53:46 UTC 2017


This series applies on u-boot/next

It aims at reducing the size taken by the mmc core in the SPL.
Recent changes (for which I'm to blame) have bloated the mmc core and have
broken platforms that were already tight on code space. This is achieved mostly
by compiling out parts of the initialization process that are not required when
the SD/MMC write operations are not used.

Using am335x_hs_evm_config and Linaro GCC 6.2-2016.11 toolchain, this series
saves 704 bytes of sram (592 bytes of code and 112 bytes of rodata).
This doesn't looks like much but it allows building the platform without
removing features from its config file (tested with commit d2ac491
("am335x_hs_evm: Trim options in SPL to reduce binary size") reverted)


Jean-Jacques Hiblot (10):
  common: do not compile common fastboot code when building the SPL
  mmc: atmel: when sending a data command, use the provided block size
  mmc: remove unneeded verification in mmc_set_card_speed()
  mmc: compile out more code if support for UHS and HS200 is not enabled
  mmc: reworked version lookup in mmc_startup_v4
  mmc: add a Kconfig option to enable the support for MMC write
    operations
  mmc: read ssr only if MMC write support is enabled
  mmc: compile out erase and write mmc commands if write operations are
    not enabled
  mmc: don't read the size of eMMC enhanced user data area in SPL
  mmc: remove hc_wp_grp_size from struct mmc if not needed

 cmd/mmc.c                   |  10 ++++
 cmd/mvebu/bubt.c            |   2 +-
 common/Makefile             |   2 +
 common/spl/Kconfig          |   8 +++
 drivers/mmc/Kconfig         |   7 +++
 drivers/mmc/Makefile        |   4 +-
 drivers/mmc/gen_atmel_mci.c |   3 +-
 drivers/mmc/mmc-uclass.c    |   2 +-
 drivers/mmc/mmc.c           | 119 +++++++++++++++++++++++---------------------
 drivers/mmc/mmc_private.h   |   4 +-
 include/mmc.h               |   8 +++
 11 files changed, 102 insertions(+), 67 deletions(-)

-- 
1.9.1



More information about the U-Boot mailing list