[PATCH 7/8] Add nexus device entries and upate waf files
Kevin Kirspel
kevin-kirspel at idexx.com
Fri Jan 27 05:32:25 UTC 2017
---
libbsd_waf.py | 6 ++-
rtemsbsd/include/bsp/nexus-devices.h | 12 +++++
rtemsbsd/include/machine/rtems-bsd-cache.h | 7 +--
rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 75 ++++++++++++++++++++++++++
4 files changed, 93 insertions(+), 7 deletions(-)
mode change 100644 => 100755 libbsd_waf.py
mode change 100644 => 100755 rtemsbsd/include/bsp/nexus-devices.h
mode change 100644 => 100755 rtemsbsd/include/machine/rtems-bsd-cache.h
mode change 100644 => 100755 rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
diff --git a/libbsd_waf.py b/libbsd_waf.py
old mode 100644
new mode 100755
index 899b8e8..7828fab
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -700,7 +700,9 @@ def build(bld):
source = objs06_source)
libbsd_use += ["objs06"]
- source = ['freebsd/sys/arm/xilinx/zy7_slcr.c',
+ source = ['freebsd/sys/arm/lpc/if_lpe.c',
+ 'freebsd/sys/arm/lpc/lpc_pwr.c',
+ 'freebsd/sys/arm/xilinx/zy7_slcr.c',
'freebsd/sys/cam/cam.c',
'freebsd/sys/cam/scsi/scsi_all.c',
'freebsd/sys/crypto/blowfish/bf_ecb.c',
@@ -1157,7 +1159,7 @@ def build(bld):
'rtemsbsd/sys/dev/tsec/if_tsec_nexus.c',
'rtemsbsd/sys/dev/usb/controller/dwc_otg_nexus.c',
'rtemsbsd/sys/dev/usb/controller/ehci_mpc83xx.c',
- 'rtemsbsd/sys/dev/usb/controller/ohci_lpc.c',
+ 'rtemsbsd/sys/dev/usb/controller/lpc_ohci.c',
'rtemsbsd/sys/dev/usb/controller/usb_otg_transceiver.c',
'rtemsbsd/sys/dev/usb/controller/usb_otg_transceiver_dump.c',
'rtemsbsd/sys/fs/devfs/devfs_devs.c',
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
old mode 100644
new mode 100755
index 0b4ec62..b681434
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -46,6 +46,18 @@
RTEMS_BSD_DRIVER_SMC0(0x4e000000, RVPBXA9_IRQ_ETHERNET);
+#elif defined(LIBBSP_ARM_LPC32XX_BSP_H)
+
+#include <bsp/irq.h>
+
+RTEMS_BSD_DRIVER_LPC32XX_PWR;
+RTEMS_BSD_DRIVER_LPC32XX_LPE;
+RTEMS_BSD_DRIVER_ICSPHY;
+RTEMS_BSD_DRIVER_LPC32XX_OHCI;
+SYSINIT_DRIVER_REFERENCE(usbus, ohci);
+RTEMS_BSD_DRIVER_USB;
+RTEMS_BSD_DRIVER_USB_MASS;
+
#elif defined(LIBBSP_M68K_GENMCF548X_BSP_H)
RTEMS_BSD_DRIVER_FEC;
diff --git a/rtemsbsd/include/machine/rtems-bsd-cache.h b/rtemsbsd/include/machine/rtems-bsd-cache.h
old mode 100644
new mode 100755
index b8c4ce7..bd496f9
--- a/rtemsbsd/include/machine/rtems-bsd-cache.h
+++ b/rtemsbsd/include/machine/rtems-bsd-cache.h
@@ -42,15 +42,12 @@
#include <bsp.h>
-#if defined(LIBBSP_ARM_LPC24XX_BSP_H)
+#if defined(LIBBSP_ARM_LPC24XX_BSP_H) || (defined(LIBBSP_ARM_LPC32XX_BSP_H) && defined(LPC32XX_DISABLE_MMU))
/* No cache */
#elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H) || \
- defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
+ defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H) || (defined(LIBBSP_ARM_LPC32XX_BSP_H) && !defined(LPC32XX_DISABLE_MMU))
/* 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>
#elif defined(__GEN83xx_BSP_h)
/* With cache, coherency support in hardware */
#endif
diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
old mode 100644
new mode 100755
index a408c17..05edf90
--- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
+++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
@@ -38,6 +38,7 @@
*
* Devices:
* RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR
+ * RTEMS_BSD_DRIVER_LPC32XX_PWR
*
* Buses:
* RTEMS_BSD_DRIVER_PC_LEGACY
@@ -46,6 +47,7 @@
* RTEMS_BSD_DRIVER_DWCOTG0
* RTEMS_BSD_DRIVER_DWCOTG0_BASE_ADDR
* RTEMS_BSD_DRIVER_DWCOTG0_IRQ
+ * RTEMS_BSD_DRIVER_LPC32XX_OHCI
* RTEMS_BSD_DRIVER_DWC_MMC
* RTEMS_BSD_DRIVER_MMC
* RTEMS_BSD_DRIVER_USB
@@ -55,6 +57,7 @@
* RTEMS_BSD_DRIVER_SMC0
* RTEMS_BSD_DRIVER_SMC0_BASE_ADDR
* RTEMS_BSD_DRIVER_SMC0_IRQ
+ * RTEMS_BSD_DRIVER_LPC32XX_LPE
* RTEMS_BSD_DRIVER_FEC
* RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0
* RTEMS_BSD_DRIVER_CGEM0_IRQ
@@ -73,6 +76,7 @@
*
* MMI PHY:
* RTEMS_BSD_DRIVER_E1000PHY
+ * RTEMS_BSD_DRIVER_ICSPHY
* RTEMS_BSD_DRIVER_REPHY
* RTEMS_BSD_DRIVER_MIPHY
*/
@@ -115,6 +119,23 @@ extern "C" {
&zy7_slcr_res[0])
#endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR */
+/*
+ * LPC32XX Power Control (PWR).
+ */
+#if !defined(RTEMS_BSD_DRIVER_LPC32XX_PWR)
+ #define RTEMS_BSD_DRIVER_LPC32XX_PWR \
+ static const rtems_bsd_device_resource lpc_pwr0_res[] = { \
+ { \
+ .type = RTEMS_BSD_RES_MEMORY, \
+ .start_request = 0, \
+ .start_actual = LPC32XX_BASE_SYSCON \
+ } \
+ }; \
+ RTEMS_BSD_DEFINE_NEXUS_DEVICE_ORDERED(pwr, 0, RTEMS_BSD_ORDER_FIRST, \
+ RTEMS_ARRAY_SIZE(lpc_pwr0_res), \
+ &lpc_pwr0_res[0])
+#endif /* RTEMS_BSD_DRIVER_LPC32XX_PWR */
+
/**
** Physical Buses
**/
@@ -155,6 +176,31 @@ extern "C" {
#endif /* RTEMS_BSD_DRIVER_DWCOTG0 */
/*
+ * LPC32XX OHCI.
+ */
+#if !defined(RTEMS_BSD_DRIVER_LPC32XX_OHCI)
+ #define RTEMS_BSD_DRIVER_LPC32XX_OHCI \
+ static const rtems_bsd_device_resource lpc_ohci0_res[] = { \
+ { \
+ .type = RTEMS_BSD_RES_MEMORY, \
+ .start_request = 0, \
+ .start_actual = LPC32XX_BASE_USB \
+ }, { \
+ .type = RTEMS_BSD_RES_MEMORY, \
+ .start_request = 0, \
+ .start_actual = (unsigned long)(&LPC32XX_I2C_RX) \
+ }, { \
+ .type = RTEMS_BSD_RES_IRQ, \
+ .start_request = 0, \
+ .start_actual = LPC32XX_IRQ_USB_HOST \
+ } \
+ }; \
+ RTEMS_BSD_DEFINE_NEXUS_DEVICE_ORDERED(ohci, 0, RTEMS_BSD_ORDER_LAST, \
+ RTEMS_ARRAY_SIZE(lpc_ohci0_res), \
+ &lpc_ohci0_res[0])
+#endif /* RTEMS_BSD_DRIVER_LPC32XX_OHCI */
+
+/*
* Designware/Synopsys MMC.
*/
#if !defined(RTEMS_BSD_DRIVER_DWC_MMC)
@@ -214,6 +260,27 @@ extern "C" {
#endif /* RTEMS_BSD_DRIVER_SMC */
/*
+ * LPC32XX LPE driver
+ */
+#if !defined(RTEMS_BSD_DRIVER_LPC32XX_LPE)
+ #define RTEMS_BSD_DRIVER_LPC32XX_LPE \
+ static const rtems_bsd_device_resource lpc_lpe0_res[] = { \
+ { \
+ .type = RTEMS_BSD_RES_MEMORY, \
+ .start_request = 0, \
+ .start_actual = LPC32XX_BASE_ETHERNET \
+ }, { \
+ .type = RTEMS_BSD_RES_IRQ, \
+ .start_request = 0, \
+ .start_actual = LPC32XX_IRQ_ETHERNET \
+ } \
+ }; \
+ RTEMS_BSD_DEFINE_NEXUS_DEVICE(lpe, 0, \
+ RTEMS_ARRAY_SIZE(lpc_lpe0_res), \
+ &lpc_lpe0_res[0])
+#endif /* RTEMS_BSD_DRIVER_LPC32XX_LPE */
+
+/*
* Coldfire Fast Ethernet Controller (FEC) driver.
*/
#if !defined(RTEMS_BSD_DRIVER_FEC)
@@ -345,6 +412,14 @@ extern "C" {
#endif /* RTEMS_BSD_DRIVER_E1000PHY */
/*
+ * ICS PHY
+ */
+#if !defined(RTEMS_BSD_DRIVER_ICSPHY)
+ #define RTEMS_BSD_DRIVER_ICSPHY \
+ SYSINIT_DRIVER_REFERENCE(icsphy, miibus);
+#endif /* RTEMS_BSD_DRIVER_ICSPHY */
+
+/*
* Reltek PHY
*/
#if !defined(RTEMS_BSD_DRIVER_REPHY)
--
1.9.1
More information about the devel
mailing list