diff mbox series

xilinx: versal: Fix compilation error when !CONFIG_NET

Message ID 6d8c3b4252fe35fe5ec7af9b19da65011209fa79.1600244307.git.michal.simek@xilinx.com
State Accepted
Commit a2c87cb82ac7b09bc48650d84330aa76941839dd
Delegated to: Michal Simek
Headers show
Series xilinx: versal: Fix compilation error when !CONFIG_NET | expand

Commit Message

Michal Simek Sept. 16, 2020, 8:18 a.m. UTC
PXE and DHCP shouldn't be listed when commands are not enabled that's why
handle it in the same way as is done for Zynq and ZynqMP.

Fixes: ec48b6c991f4 ("arm64: versal: Add support for new Xilinx Versal ACAPs")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/configs/xilinx_versal.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Comments

Michal Simek Sept. 23, 2020, 12:31 p.m. UTC | #1
On 16. 09. 20 10:18, Michal Simek wrote:
> PXE and DHCP shouldn't be listed when commands are not enabled that's why
> handle it in the same way as is done for Zynq and ZynqMP.
> 
> Fixes: ec48b6c991f4 ("arm64: versal: Add support for new Xilinx Versal ACAPs")
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  include/configs/xilinx_versal.h | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
> index d7255a05dff1..8b416327b57c 100644
> --- a/include/configs/xilinx_versal.h
> +++ b/include/configs/xilinx_versal.h
> @@ -94,6 +94,18 @@
>  # define BOOT_TARGET_DEVICES_MMC(func)
>  #endif
>  
> +#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
> +# define BOOT_TARGET_DEVICES_PXE(func)	func(PXE, pxe, na)
> +#else
> +# define BOOT_TARGET_DEVICES_PXE(func)
> +#endif
> +
> +#if defined(CONFIG_CMD_DHCP)
> +# define BOOT_TARGET_DEVICES_DHCP(func)	func(DHCP, dhcp, na)
> +#else
> +# define BOOT_TARGET_DEVICES_DHCP(func)
> +#endif
> +
>  #if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
>  # define BOOT_TARGET_DEVICES_XSPI(func)	func(XSPI, xspi, 0)
>  #else
> @@ -135,8 +147,8 @@
>  	BOOT_TARGET_DEVICES_MMC(func) \
>  	BOOT_TARGET_DEVICES_XSPI(func) \
>  	BOOT_TARGET_DEVICES_DFU_USB(func) \
> -	func(PXE, pxe, na) \
> -	func(DHCP, dhcp, na)
> +	BOOT_TARGET_DEVICES_PXE(func) \
> +	BOOT_TARGET_DEVICES_DHCP(func)
>  
>  #include <config_distro_bootcmd.h>
>  
> 

Applied.
M
diff mbox series

Patch

diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index d7255a05dff1..8b416327b57c 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -94,6 +94,18 @@ 
 # define BOOT_TARGET_DEVICES_MMC(func)
 #endif
 
+#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
+# define BOOT_TARGET_DEVICES_PXE(func)	func(PXE, pxe, na)
+#else
+# define BOOT_TARGET_DEVICES_PXE(func)
+#endif
+
+#if defined(CONFIG_CMD_DHCP)
+# define BOOT_TARGET_DEVICES_DHCP(func)	func(DHCP, dhcp, na)
+#else
+# define BOOT_TARGET_DEVICES_DHCP(func)
+#endif
+
 #if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
 # define BOOT_TARGET_DEVICES_XSPI(func)	func(XSPI, xspi, 0)
 #else
@@ -135,8 +147,8 @@ 
 	BOOT_TARGET_DEVICES_MMC(func) \
 	BOOT_TARGET_DEVICES_XSPI(func) \
 	BOOT_TARGET_DEVICES_DFU_USB(func) \
-	func(PXE, pxe, na) \
-	func(DHCP, dhcp, na)
+	BOOT_TARGET_DEVICES_PXE(func) \
+	BOOT_TARGET_DEVICES_DHCP(func)
 
 #include <config_distro_bootcmd.h>