[rtems-libbsd commit] ffec: Port to RTEMS
Sebastian Huber
sebh at rtems.org
Wed Sep 27 09:12:03 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: 95b102f7331cb257f18955374515eec8532eb1b0
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=95b102f7331cb257f18955374515eec8532eb1b0
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 22 17:44:27 2017 +0200
ffec: Port to RTEMS
---
freebsd/sys/dev/ffec/if_ffec.c | 4 ++++
libbsd.py | 2 ++
libbsd_waf.py | 1 +
rtemsbsd/include/bsp/nexus-devices.h | 7 +++++++
4 files changed, 14 insertions(+)
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c
index cf37d51..6df995c 100644
--- a/freebsd/sys/dev/ffec/if_ffec.c
+++ b/freebsd/sys/dev/ffec/if_ffec.c
@@ -1464,7 +1464,11 @@ ffec_attach(device_t dev)
if (sc->phy_conn_type == PHY_CONN_UNKNOWN) {
device_printf(sc->dev, "No valid 'phy-mode' "
"property found in FDT data for device.\n");
+#ifndef __rtems__
error = ENOATTR;
+#else /* __rtems__ */
+ error = ENXIO;
+#endif /* __rtems__ */
goto out;
}
diff --git a/libbsd.py b/libbsd.py
index 536ed5f..2a9a8ba 100644
--- a/libbsd.py
+++ b/libbsd.py
@@ -1220,6 +1220,7 @@ def dev_net(mm):
mod = builder.Module('dev_net')
mod.addKernelSpaceHeaderFiles(
[
+ 'sys/dev/ffec/if_ffecreg.h',
'sys/dev/mii/mii.h',
'sys/dev/mii/mii_bitbang.h',
'sys/dev/mii/miivar.h',
@@ -1253,6 +1254,7 @@ def dev_net(mm):
)
mod.addKernelSpaceSourceFiles(
[
+ 'sys/dev/ffec/if_ffec.c',
'sys/dev/mii/mii.c',
'sys/dev/mii/mii_bitbang.c',
'sys/dev/mii/mii_physubr.c',
diff --git a/libbsd_waf.py b/libbsd_waf.py
index e5d07a6..a2f581f 100644
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -1616,6 +1616,7 @@ def build(bld):
'freebsd/sys/dev/evdev/uinput.c',
'freebsd/sys/dev/fdt/fdt_common.c',
'freebsd/sys/dev/fdt/simplebus.c',
+ 'freebsd/sys/dev/ffec/if_ffec.c',
'freebsd/sys/dev/fxp/if_fxp.c',
'freebsd/sys/dev/kbd/kbd.c',
'freebsd/sys/dev/led/led.c',
diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
index dcd9dc7..082363a 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -113,6 +113,13 @@ RTEMS_BSD_DRIVER_MMC;
RTEMS_BSD_DRIVER_USB;
RTEMS_BSD_DRIVER_USB_MASS;
+#elif defined(LIBBSP_ARM_IMX_BSP_H)
+
+RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
+SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
+SYSINIT_DRIVER_REFERENCE(ffec, simplebus);
+SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
+
#elif defined(LIBBSP_ARM_LPC24XX_BSP_H)
RTEMS_BSD_DEFINE_NEXUS_DEVICE(ohci, 0, 0, NULL);
More information about the vc
mailing list