summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2021-02-01 10:07:50 -0600
committerJoel Sherrill <joel@rtems.org>2021-03-10 08:57:59 -0600
commit1d9f93cbaa771282cd0c9499d7a762ab3868cea1 (patch)
treeab12f1cd89fff16b32863caeb752fcc31c320d1e
parentif_cgem: Add support for ZynqMP CGEM (diff)
downloadrtems-libbsd-1d9f93cbaa771282cd0c9499d7a762ab3868cea1.tar.bz2
nexus: Switch ZynqMP platforms to CGEM3
Similar to the UARTs, ZynqMP hardware platforms use the highest memory-mapped CGEM peripheral as the primary instance of that peripheral. This change allows operation on hardware as well as QEMU.
-rw-r--r--rtemsbsd/include/bsp/nexus-devices.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index c3c43dc9..7cdd5428 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -107,7 +107,14 @@ RTEMS_BSD_DRIVER_MMC;
#include <bsp/irq.h>
-RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
+/* Qemu only applies user-mode networking to the first interface by default, so
+ * all 4 CGEM instances must be configured in the Qemu arguments using
+ * "-nic user,model=cadence_gem" for each nic.
+ *
+ * CGEM3 is used for LibBSD because all Zynq Ultrascale+ MPSoC dev boards treat
+ * the highest-mapped CGEM as the primary interface.
+ */
+RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(ZYNQMP_IRQ_ETHERNET_3);
RTEMS_BSD_DRIVER_E1000PHY;
#elif defined(LIBBSP_ARM_ATSAM_BSP_H)