summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-26 15:39:18 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-01 09:15:30 +0200
commitaee6864330998a6952c4a4dad6a5395089df1613 (patch)
tree9393a51dd919c0ef7be5f9997e04a72262706980
parent6b176ce6683dce004b4c68b3dadd11b813e9f70a (diff)
downloadrtems-libbsd-aee6864330998a6952c4a4dad6a5395089df1613.tar.bz2
if_dwc: Add Altera Cyclone V support
-rw-r--r--rtemsbsd/include/bsp/nexus-devices.h20
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-cache.h3
-rw-r--r--testsuite/include/rtems/bsd/test/network-config.h.in4
3 files changed, 25 insertions, 2 deletions
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index f615e4e4..fcd8775f 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 e809eaae..b8c4ce7e 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 adcc3209..30a9c5ae 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"