[U-Boot] SPL: mmc_load_image_raw_sector() linked even if not used

Petr Kulhavy brain at jikos.cz
Sun Jun 12 23:09:58 CEST 2016


Hi,

it seems that mmc_load_image_raw_sector() in spl_mmc.c is always linked 
even if the board does not use raw MMC (and e.g. FS instead).
This unnecessarily blows up the SPL code.

I'm just wondering if there is some deeper reason behind.
Otherwise I will prepare a patch to condition it out with something like 
this:

#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR) ||
     defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION) ||
     defined(CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR)

The call from mmc_load_image_raw_os() by the way also requires 
CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to be defined even if not used, 
just to make the compiler quiet.
This could be fixed as well.

Thanks
Petr



More information about the U-Boot mailing list