[rtems-libbsd commit] if_dwc: Add Altera Cyclone V support
Sebastian Huber
sebh at rtems.org
Wed Apr 1 07:16:38 UTC 2015
Module: rtems-libbsd
Branch: master
Commit: aee6864330998a6952c4a4dad6a5395089df1613
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=aee6864330998a6952c4a4dad6a5395089df1613
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 26 15:39:18 2015 +0100
if_dwc: Add Altera Cyclone V support
---
rtemsbsd/include/bsp/nexus-devices.h | 20 ++++++++++++++++++++
rtemsbsd/include/machine/rtems-bsd-cache.h | 3 ++-
testsuite/include/rtems/bsd/test/network-config.h.in | 4 +++-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index f615e4e..fcd8775 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -90,6 +90,26 @@ SYSINIT_DRIVER_REFERENCE(e1000phy, miibus);
#elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H)
+#include <bsp/socal/hps.h>
+#include <bsp/irq.h>
+
+static const rtems_bsd_device_resource dwc0_res[] = {
+ {
+ .type = RTEMS_BSD_RES_MEMORY,
+ .start_request = 0,
+ .start_actual = (unsigned long)ALT_EMAC1_ADDR
+ }, {
+ .type = RTEMS_BSD_RES_IRQ,
+ .start_request = 0,
+ .start_actual = ALT_INT_INTERRUPT_EMAC1_IRQ
+ }
+};
+
+RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwc, 0, RTEMS_ARRAY_SIZE(dwc0_res),
+ &dwc0_res[0]);
+
+SYSINIT_DRIVER_REFERENCE(micphy, miibus);
+
RTEMS_BSD_DEFINE_NEXUS_DEVICE(dw_mmc, 0, 0, NULL);
SYSINIT_DRIVER_REFERENCE(mmc, dw_mmc);
diff --git a/rtemsbsd/include/machine/rtems-bsd-cache.h b/rtemsbsd/include/machine/rtems-bsd-cache.h
index e809eaa..b8c4ce7 100644
--- a/rtemsbsd/include/machine/rtems-bsd-cache.h
+++ b/rtemsbsd/include/machine/rtems-bsd-cache.h
@@ -44,7 +44,8 @@
#if defined(LIBBSP_ARM_LPC24XX_BSP_H)
/* No cache */
-#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
+#elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H) || \
+ 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)
diff --git a/testsuite/include/rtems/bsd/test/network-config.h.in b/testsuite/include/rtems/bsd/test/network-config.h.in
index adcc320..30a9c5a 100644
--- a/testsuite/include/rtems/bsd/test/network-config.h.in
+++ b/testsuite/include/rtems/bsd/test/network-config.h.in
@@ -34,7 +34,9 @@
#include <bsp.h>
-#if defined(LIBBSP_ARM_REALVIEW_PBX_A9_BSP_H)
+#if defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H)
+ #define NET_CFG_INTERFACE_0 "dwc0"
+#elif 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"
More information about the vc
mailing list