Re: [U-Boot] [PATCH v2 0/9] reduce the size of the mmc core
On 01/04/2018 11:23 PM, Jean-Jacques Hiblot wrote: > > 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 624 bytes of sram (512 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) > > Changes in v2: > - atmel_mci: fixed v1 bug by setting the block length before each transfer. > - atmel_mci: removed loop to read/write dummy data as it is not needed anymore > - compile out code for HS200 in mmc_get_capabilities() > - fixed usage of CONFIG_IS_ENABLED() in the definition of mmc_blk_ops > - default SPL_MMC_WRITE to 'n' > - removed patch 'mmc: remove unneeded verification in mmc_set_card_speed()' > > Jean-Jacques Hiblot (9): > common: do not compile common fastboot code when building the SPL > mmc: atmel: when sending a data command, use the provided block size > 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 Applied to u-boot-mmc. Thanks! Best Regards, Jaehoon Chung > > cmd/mmc.c | 10 + > cmd/mvebu/bubt.c| 2 +- > common/Makefile | 2 + > common/spl/Kconfig | 9 + > drivers/mmc/Kconfig | 7 > drivers/mmc/Makefile| 4 +- > drivers/mmc/gen_atmel_mci.c | 42 +-- > drivers/mmc/mmc-uclass.c| 2 +- > drivers/mmc/mmc.c | 99 > +++-- > drivers/mmc/mmc_private.h | 4 +- > include/mmc.h | 8 > 11 files changed, 121 insertions(+), 68 deletions(-) > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/9] reduce the size of the mmc core
On Thu, 2018-01-04 at 15:23 +0100, Jean-Jacques Hiblot wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > 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. I have not looked at the code so maybe this off ... You can save a lot of space/code if you avoid static/global variables. Instead of #define MYSTR "some cool feature" static char *mystr = MYSTR; do fun() { char *mystr = MYSTR; ... } Avoid static/global vars at all cost! Jocke ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 0/9] reduce the size of the mmc core
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 624 bytes of sram (512 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) Changes in v2: - atmel_mci: fixed v1 bug by setting the block length before each transfer. - atmel_mci: removed loop to read/write dummy data as it is not needed anymore - compile out code for HS200 in mmc_get_capabilities() - fixed usage of CONFIG_IS_ENABLED() in the definition of mmc_blk_ops - default SPL_MMC_WRITE to 'n' - removed patch 'mmc: remove unneeded verification in mmc_set_card_speed()' Jean-Jacques Hiblot (9): common: do not compile common fastboot code when building the SPL mmc: atmel: when sending a data command, use the provided block size 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 | 9 + drivers/mmc/Kconfig | 7 drivers/mmc/Makefile| 4 +- drivers/mmc/gen_atmel_mci.c | 42 +-- drivers/mmc/mmc-uclass.c| 2 +- drivers/mmc/mmc.c | 99 +++-- drivers/mmc/mmc_private.h | 4 +- include/mmc.h | 8 11 files changed, 121 insertions(+), 68 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot