summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2021-06-30 15:00:58 -0500
committerJoel Sherrill <joel@rtems.org>2021-07-01 10:33:39 -0500
commitb0c8153d54f7b14ed305f0da23a3dc2e207a0968 (patch)
tree7c53a8087ab8835ab2dacfaa3ee3546de89b5df3
parentrtemsbsd: Added a test for the TTCP command. (diff)
downloadrtems-libbsd-b0c8153d54f7b14ed305f0da23a3dc2e207a0968.tar.bz2
rtemsbsd: Use config.inc to control ZynqMP ethernet
This alters the selection of the 4 Cadence GEM interfaces on the Zynq Ultrascale+ MPSoC BSP to be provided by config.inc instead of being provided by options in the RTEMS BSP itself since those options appear to be dead code when not used in conjunction with LibBSD.
-rw-r--r--rtemsbsd/include/bsp/nexus-devices.h9
-rwxr-xr-xtestsuite/include/rtems/bsd/test/network-config.h.in8
-rw-r--r--waf_libbsd.py4
3 files changed, 16 insertions, 5 deletions
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index 5c1bab42..cbb3f48b 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -38,6 +38,7 @@
#include <rtems/bsd/bsd.h>
#include <rtems/bsd/modules.h>
+#include <rtems/bsd/test/network-config.h>
#include <machine/rtems-bsd-nexus-bus.h>
@@ -115,16 +116,16 @@ RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SLCR;
* CGEM3 is used for LibBSD because all Zynq Ultrascale+ MPSoC dev boards treat
* the highest-mapped CGEM as the primary interface.
*/
-#if BSP_XILINX_ZYNQMP_USE_CGEM0
+#if NET_CFG_ZYNQMP_USE_CGEM0 == '1'
RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
#endif
-#if BSP_XILINX_ZYNQMP_USE_CGEM1
+#if NET_CFG_ZYNQMP_USE_CGEM1 == '1'
RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM1(ZYNQMP_IRQ_ETHERNET_1);
#endif
-#if BSP_XILINX_ZYNQMP_USE_CGEM2
+#if NET_CFG_ZYNQMP_USE_CGEM2 == '1'
RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM2(ZYNQMP_IRQ_ETHERNET_2);
#endif
-#if BSP_XILINX_ZYNQMP_USE_CGEM3
+#if NET_CFG_ZYNQMP_USE_CGEM3 == '1'
RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(ZYNQMP_IRQ_ETHERNET_3);
#endif
RTEMS_BSD_DRIVER_E1000PHY;
diff --git a/testsuite/include/rtems/bsd/test/network-config.h.in b/testsuite/include/rtems/bsd/test/network-config.h.in
index 39bb5388..da316e15 100755
--- a/testsuite/include/rtems/bsd/test/network-config.h.in
+++ b/testsuite/include/rtems/bsd/test/network-config.h.in
@@ -64,4 +64,12 @@
#define NET_CFG_GATEWAY_IP "@NET_CFG_GATEWAY_IP@"
+#define NET_CFG_ZYNQMP_USE_CGEM0 '@NET_CFG_ZYNQMP_USE_CGEM0@'
+
+#define NET_CFG_ZYNQMP_USE_CGEM1 '@NET_CFG_ZYNQMP_USE_CGEM1@'
+
+#define NET_CFG_ZYNQMP_USE_CGEM2 '@NET_CFG_ZYNQMP_USE_CGEM2@'
+
+#define NET_CFG_ZYNQMP_USE_CGEM3 '@NET_CFG_ZYNQMP_USE_CGEM3@'
+
#endif /* _RTEMS_BSD_TEST_NETWORK_CONFIG_H_ */
diff --git a/waf_libbsd.py b/waf_libbsd.py
index e7222a03..bb4182e3 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -289,7 +289,9 @@ class Builder(builder.ModuleManager):
(bld.env.NET_CONFIG))
tags = [
'NET_CFG_INTERFACE_0', 'NET_CFG_SELF_IP', 'NET_CFG_NETMASK',
- 'NET_CFG_PEER_IP', 'NET_CFG_GATEWAY_IP'
+ 'NET_CFG_PEER_IP', 'NET_CFG_GATEWAY_IP',
+ 'NET_CFG_ZYNQMP_USE_CGEM0', 'NET_CFG_ZYNQMP_USE_CGEM1',
+ 'NET_CFG_ZYNQMP_USE_CGEM2', 'NET_CFG_ZYNQMP_USE_CGEM3'
]
try:
net_cfg_lines = open(bld.env.NET_CONFIG).readlines()