diff mbox series

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

Message ID 20230428075336.135516-4-n-jain1@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Update env support for Am62x | expand

Commit Message

Nikhil Jain April 28, 2023, 7:53 a.m. UTC
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@ti.com>
---
 include/configs/am62x_evm.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Tom Rini April 28, 2023, 1:01 p.m. UTC | #1
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@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.
diff mbox series

Patch

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)