[PATCH 3/3] include: configs: am62x_evm: Use CONFIG_IS_ENABLED

Tom Rini trini at konsulko.com
Fri Apr 28 15:01:54 CEST 2023


On Fri, Apr 28, 2023 at 01:23:36PM +0530, Nikhil M Jain wrote:
> Update to using CONFIG_IS_ENABLED and change DISTRO_BOOT_DEV_MMC to
> first attempt SD card boot and next emmc boot.
> 
> Signed-off-by: Nikhil M Jain <n-jain1 at ti.com>
> ---
>  include/configs/am62x_evm.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
> index 7bf07809b0..55ed2bc68f 100644
> --- a/include/configs/am62x_evm.h
> +++ b/include/configs/am62x_evm.h
> @@ -15,19 +15,19 @@
>  /* DDR Configuration */
>  #define CFG_SYS_SDRAM_BASE1		0x880000000
>  
> -#ifdef CONFIG_CMD_MMC
> -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
> +#if CONFIG_IS_ENABLED(CMD_MMC)
> +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 1) func(MMC, mmc, 0)
>  #else
>  #define DISTRO_BOOT_DEV_MMC(func)
>  #endif
>  
> -#ifdef CONFIG_CMD_PXE
> +#if CONFIG_IS_ENABLED(CMD_PXE)
>  #define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na)
>  #else
>  #define DISTRO_BOOT_DEV_PXE(func)
>  #endif
>  
> -#ifdef CONFIG_CMD_DHCP
> +#if CONFIG_IS_ENABLED(CMD_DHCP)
>  #define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na)
>  #else
>  #define DISTRO_BOOT_DEV_DHCP(func)

Using CONFIG_IS_ENABLED is bad here, there's no context outside of full
U-Boot where we have CMD_foo being possible.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230428/be11bd2e/attachment.sig>


More information about the U-Boot mailing list