diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-08-22 17:44:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-27 11:02:06 +0200 |
commit | 95b102f7331cb257f18955374515eec8532eb1b0 (patch) | |
tree | c70b04373466141c10a8a3f16ed9d17f11d2958d | |
parent | ffec: Import from FreeBSD (diff) | |
download | rtems-libbsd-95b102f7331cb257f18955374515eec8532eb1b0.tar.bz2 |
ffec: Port to RTEMS
-rw-r--r-- | freebsd/sys/dev/ffec/if_ffec.c | 4 | ||||
-rw-r--r-- | libbsd.py | 2 | ||||
-rw-r--r-- | libbsd_waf.py | 1 | ||||
-rw-r--r-- | rtemsbsd/include/bsp/nexus-devices.h | 7 |
4 files changed, 14 insertions, 0 deletions
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c index cf37d51e..6df995c9 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; } @@ -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 e5d07a6e..a2f581f7 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 dcd9dc7b..082363a0 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); |