[rtems-libbsd commit] Add Xilinx Zynq BSP support

Sebastian Huber sebh at rtems.org
Wed Jan 21 14:02:59 UTC 2015


Module:    rtems-libbsd
Branch:    master
Commit:    5071600b2172b5d37c1f5608f1c623143c651058
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=5071600b2172b5d37c1f5608f1c623143c651058

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan 20 11:04:39 2015 +0100

Add Xilinx Zynq BSP support

---

 rtemsbsd/include/bsp/nexus-devices.h               | 32 ++++++++++++++++++++++
 rtemsbsd/include/machine/rtems-bsd-cache.h         |  3 ++
 .../include/rtems/bsd/test/network-config.h.in     |  2 ++
 3 files changed, 37 insertions(+)

diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index 0857481..d12d9bd 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -56,4 +56,36 @@ RTEMS_BSD_DEFINE_NEXUS_DEVICE(smc, 0, RTEMS_ARRAY_SIZE(smc0_res),
 
 RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL);
 
+#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
+
+#include <bsp/irq.h>
+
+static const rtems_bsd_device_resource zy7_slcr0_res[] = {
+	{
+		.type = RTEMS_BSD_RES_MEMORY,
+		.start_request = 0,
+		.start_actual = 0xf8000000
+	}
+};
+
+RTEMS_BSD_DEFINE_NEXUS_DEVICE(zy7_slcr, 0, RTEMS_ARRAY_SIZE(zy7_slcr0_res),
+   &zy7_slcr0_res[0]);
+
+static const rtems_bsd_device_resource cgem0_res[] = {
+	{
+		.type = RTEMS_BSD_RES_MEMORY,
+		.start_request = 0,
+		.start_actual = 0xe000b000
+	}, {
+		.type = RTEMS_BSD_RES_IRQ,
+		.start_request = 0,
+		.start_actual = ZYNQ_IRQ_ETHERNET_0
+	}
+};
+
+RTEMS_BSD_DEFINE_NEXUS_DEVICE(cgem, 0, RTEMS_ARRAY_SIZE(cgem0_res),
+   &cgem0_res[0]);
+
+SYSINIT_DRIVER_REFERENCE(e1000phy, miibus);
+
 #endif
diff --git a/rtemsbsd/include/machine/rtems-bsd-cache.h b/rtemsbsd/include/machine/rtems-bsd-cache.h
index 77cc079..838f730 100644
--- a/rtemsbsd/include/machine/rtems-bsd-cache.h
+++ b/rtemsbsd/include/machine/rtems-bsd-cache.h
@@ -27,6 +27,9 @@
 
 #if defined(LIBBSP_ARM_LPC24XX_BSP_H)
   /* No cache */
+#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
+  /* With cache, no coherency support in hardware */
+  #define CPU_DATA_CACHE_ALIGNMENT 32
 #elif defined(LIBBSP_ARM_LPC32XX_BSP_H)
   /* With cache, no coherency support in hardware */
   #include <libcpu/cache.h>
diff --git a/testsuite/include/rtems/bsd/test/network-config.h.in b/testsuite/include/rtems/bsd/test/network-config.h.in
index 34b878f..adcc320 100644
--- a/testsuite/include/rtems/bsd/test/network-config.h.in
+++ b/testsuite/include/rtems/bsd/test/network-config.h.in
@@ -36,6 +36,8 @@
 
 #if defined(LIBBSP_ARM_REALVIEW_PBX_A9_BSP_H)
   #define NET_CFG_INTERFACE_0 "smc0"
+#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
+  #define NET_CFG_INTERFACE_0 "cgem0"
 #elif defined(__GENMCF548X_BSP_H)
   #define NET_CFG_INTERFACE_0 "fec0"
 #else



More information about the vc mailing list