[U-Boot] [PATCH v1] spl: eMMC/SD: Provide one __weak spl_boot_mode() function

Marek Vasut marex at denx.de
Sat Jan 27 22:01:45 UTC 2018


On 01/27/2018 10:55 PM, Lukasz Majewski wrote:
> The goal of this patch is to clean up the code related to choosing spl
> MMC boot mode.
> 
> The spl_boot_mode() now is called only in spl_mmc_load_image() function,
> which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled.

It always was ;-)

> To achieve the goal, all per mach/arch implementations eligible for
> unification has been replaced with one __weak implementation.
> 
> Signed-off-by: Lukasz Majewski <lukma at denx.de>
> 
> ---
> Comments regarding cleanup (to help maintainers assessment if those changes
> break anything):

You should run it through Travis at least, to detect if something
stopped building.

> Implementations necessary to stay as is:
> ----------------------------------------
> - SW fix for broken ROM boot code
>         arch/arm/mach-uniphier/mmc-boot-mode.c
> 
> - Omap specific adjustments:
>         arch/arm/mach-omap2/boot-common.c
> 
> Below archs had a bit off-standard approach, but were eligible for using
> the __weak function:
> --------------------
> - at91 -> check if proper configs flags in the weak function are set:
>         arch/arm/mach-at91/spl.c
> 
> - zyncmp -> the BOOT_DEVICE_RAM return of spl_boot_mode seems like an error
>         (will hang in spl_mmc_load_image() anyway)
>         arch/arm/cpu/armv8/zynqmp/spl.c
> 
> - fsl -> here we had a return of BOOT_DEVICE_NAND, but the spl_boot_mode is
>         eMMC/SD card specific
>         (will hang in spl_mmc_load_image() anyway)
> 
>         arch/arm/cpu/armv8/fsl-layerscape/spl.c
>         arch/arm/cpu/armv7/ls102xa/spl.c
>         arch/arm/cpu/arm1136/mx35/generic.c
> 
> Test HW:
> 
> iMX6Q - display5 board
Reviewed-by: Marek Vasut <marex at denx.de>

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list