[PATCH rtems-libbsd v2] aarch64/nexus: add GEM definitions for Versal

Gedare Bloom gedare at rtems.org
Fri Jun 25 19:04:27 UTC 2021


---
 rtemsbsd/include/bsp/nexus-devices.h           |  7 +++++++
 rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index efe4fcb4..e6487470 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
 RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
 RTEMS_BSD_DRIVER_E1000PHY;
 
+#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
+
+#include <bsp/irq.h>
+
+RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
+RTEMS_BSD_DRIVER_E1000PHY;
+
 #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
 
 RTEMS_BSD_DRIVER_USB;
diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
index 5902c58c..50a43873 100644
--- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
+++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
@@ -409,6 +409,17 @@ extern "C" {
   #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)       \
     RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e0000, _irq)
 #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
+/*
+ * Versal has a similar GEM as the CGEM. This should work for now.
+ */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)                \
+    RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(0, 0xff0c0000, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)       \
+    RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(1, 0xff0d0000, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
 
 /*
  * Designware/Synopsys Ethernet MAC Controller.
-- 
2.25.1



More information about the devel mailing list