Index: libbsd.py
===================================================================
--- libbsd.py	(revision 860d833e050cc75003c6822dbcb5d4dd58ce327a)
+++ libbsd.py	(revision 457b4fc92766ff9030b3a8b50037af35bb2b3a13)
@@ -314,4 +314,5 @@
                 'sys/dev/dw_mmc/dw_mmc.c',
                 'sys/dev/ffec/if_ffec_mcf548x.c',
+                'sys/dev/ffec/if_ffec_mpc8xx.c',
                 'sys/dev/input/touchscreen/tsc_lpc32xx.c',
                 'sys/dev/smc/if_smc_nexus.c',
Index: rtemsbsd/include/bsp/nexus-devices.h
===================================================================
--- rtemsbsd/include/bsp/nexus-devices.h	(revision 860d833e050cc75003c6822dbcb5d4dd58ce327a)
+++ rtemsbsd/include/bsp/nexus-devices.h	(revision 457b4fc92766ff9030b3a8b50037af35bb2b3a13)
@@ -176,4 +176,8 @@
 #endif /* QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) */
 
+#elif defined(LIBBSP_POWERPC_TQM8XX_BSP_H)
+
+RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL);
+
 #endif
 
Index: rtemsbsd/sys/dev/ffec/if_ffec_mpc8xx.c
===================================================================
--- rtemsbsd/sys/dev/ffec/if_ffec_mpc8xx.c	(revision 860d833e050cc75003c6822dbcb5d4dd58ce327a)
+++ rtemsbsd/sys/dev/ffec/if_ffec_mpc8xx.c	(revision 457b4fc92766ff9030b3a8b50037af35bb2b3a13)
@@ -52,23 +52,38 @@
 
 #include <bsp.h>
+
+#ifdef LIBBSP_POWERPC_TQM8XX_BSP_H
+
 #include <stdio.h>
-#include <errno.h>
-#include <rtems/error.h>
-#include <rtems/rtems_bsdnet.h>
-#include <rtems/rtems_mii_ioctl.h>
 
 #include <sys/param.h>
+#include <sys/types.h>
 #include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
 #include <sys/socket.h>
 #include <sys/sockio.h>
 
+#include <sys/bus.h>
+#include <machine/bus.h>
+
 #include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_var.h>
+
 #include <bsp/irq.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
+#include <rtems/rtems_mii_ioctl.h>
+#include <rtems/bsd/bsd.h>
+#include <errno.h>
+
+/* FIXME */
+rtems_id
+rtems_bsdnet_newproc (char *name, int stacksize, void(*entry)(void *), void *arg);
+#define SIO_RTEMS_SHOW_STATS _IO('i', 250)
 
 /*
@@ -117,8 +132,9 @@
  */
 struct m8xx_fec_enet_struct {
-  struct arpcom           arpcom;
+  device_t                dev;
+  struct ifnet            *ifp;
+  struct mtx              mtx;
   struct mbuf             **rxMbuf;
   struct mbuf             **txMbuf;
-  int                     acceptBroadcast;
   int                     rxBdCount;
   int                     txBdCount;
@@ -126,8 +142,10 @@
   int                     txBdTail;
   int                     txBdActiveCount;
+  struct callout          watchdogCallout;
   m8xxBufferDescriptor_t  *rxBdBase;
   m8xxBufferDescriptor_t  *txBdBase;
   rtems_id                rxDaemonTid;
   rtems_id                txDaemonTid;
+  int                     if_flags;
 
   /*
@@ -159,5 +177,28 @@
   unsigned long   txRawWait;
 };
-static struct m8xx_fec_enet_struct enet_driver[NIFACES];
+
+int fec_mode_adapt (struct ifnet *ifp);
+
+#define FEC_LOCK(sc) mtx_lock(&(sc)->mtx)
+
+#define FEC_UNLOCK(sc) mtx_unlock(&(sc)->mtx)
+
+#define FEC_EVENT RTEMS_EVENT_0
+
+static void fec_send_event(rtems_id task, rtems_event_set out)
+{
+  rtems_event_send(task, out);
+}
+
+static void fec_wait_for_event(struct m8xx_fec_enet_struct *sc,
+			       rtems_event_set in)
+{
+  rtems_event_set out;
+
+  FEC_UNLOCK(sc);
+  rtems_event_receive(in, RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT,
+		      &out);
+  FEC_LOCK(sc);
+}
 
 /* declare ioctl function for internal use */
@@ -325,6 +366,8 @@
  * FEC interrupt handler
  */
-static void m8xx_fec_interrupt_handler (void *unused)
-{
+static void m8xx_fec_interrupt_handler (void *arg)
+{
+  struct m8xx_fec_enet_struct *sc = arg;
+
   /*
    * Frame received?
@@ -332,6 +375,6 @@
   if (m8xx.fec.ievent & M8xx_FEC_IEVENT_RFINT) {
     m8xx.fec.ievent = M8xx_FEC_IEVENT_RFINT;
-    enet_driver[0].rxInterrupts++;
-    rtems_bsdnet_event_send (enet_driver[0].rxDaemonTid, INTERRUPT_EVENT);
+    sc->rxInterrupts++;
+    fec_send_event (sc->rxDaemonTid, INTERRUPT_EVENT);
   }
 
@@ -341,28 +384,8 @@
   if (m8xx.fec.ievent & M8xx_FEC_IEVENT_TFINT) {
     m8xx.fec.ievent = M8xx_FEC_IEVENT_TFINT;
-    enet_driver[0].txInterrupts++;
-    rtems_bsdnet_event_send (enet_driver[0].txDaemonTid, INTERRUPT_EVENT);
-  }
-}
-
-/*
- * Please organize FEC controller code better by moving code from
- * m860_fec_initialize_hardware to m8xx_fec_ethernet_on
- */
-static void m8xx_fec_ethernet_on(const rtems_irq_connect_data* ptr){};
-static void m8xx_fec_ethernet_off(const rtems_irq_connect_data* ptr){};
-static int m8xx_fec_ethernet_isOn (const rtems_irq_connect_data* ptr)
-{
-  return 1;
-}
-
-static rtems_irq_connect_data ethernetFECIrqData = {
-  BSP_FAST_ETHERNET_CTRL,
-  m8xx_fec_interrupt_handler,
-  NULL,
-  m8xx_fec_ethernet_on,
-  m8xx_fec_ethernet_off,
-  m8xx_fec_ethernet_isOn
-};
+    sc->txInterrupts++;
+    fec_send_event (sc->txDaemonTid, INTERRUPT_EVENT);
+  }
+}
 
 static void
@@ -371,4 +394,5 @@
   int i;
   unsigned char *hwaddr;
+  rtems_status_code status;
 
   /*
@@ -410,5 +434,5 @@
    * Set our physical address
    */
-  hwaddr = sc->arpcom.ac_enaddr;
+  hwaddr = IF_LLADDR(sc->ifp);
 
   m8xx.fec.addr_low = (hwaddr[0] << 24) | (hwaddr[1] << 16) |
@@ -431,7 +455,7 @@
    */
   sc->rxMbuf = malloc (sc->rxBdCount * sizeof *sc->rxMbuf,
-                       M_MBUF, M_NOWAIT);
+                       M_TEMP, M_NOWAIT);
   sc->txMbuf = malloc (sc->txBdCount * sizeof *sc->txMbuf,
-                       M_MBUF, M_NOWAIT);
+                       M_TEMP, M_NOWAIT);
   if (!sc->rxMbuf || !sc->txMbuf)
     rtems_panic ("No memory for mbuf pointers");
@@ -503,5 +527,8 @@
    * Set up interrupts
    */
-  if (!BSP_install_rtems_irq_handler (&ethernetFECIrqData))
+  status = rtems_interrupt_handler_install(BSP_FAST_ETHERNET_CTRL, "FEC",
+					   RTEMS_INTERRUPT_UNIQUE,
+					   m8xx_fec_interrupt_handler, sc);
+  if (status != RTEMS_SUCCESSFUL)
     rtems_panic ("Can't attach M860 FEC interrupt handler\n");
 
@@ -510,5 +537,5 @@
 {
   struct m8xx_fec_enet_struct *sc = (struct m8xx_fec_enet_struct *)arg;
-  struct ifnet *ifp = &sc->arpcom.ac_if;
+  struct ifnet *ifp = sc->ifp;
   struct mbuf *m;
   uint16_t   status;
@@ -516,4 +543,6 @@
   int rxBdIndex;
 
+  FEC_LOCK(sc);
+
   /*
    * Allocate space for incoming packets and start reception
@@ -521,6 +550,5 @@
   for (rxBdIndex = 0 ; ;) {
     rxBd = sc->rxBdBase + rxBdIndex;
-    MGETHDR (m, M_WAIT, MT_DATA);
-    MCLGET (m, M_WAIT);
+    m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
     m->m_pkthdr.rcvif = ifp;
     sc->rxMbuf[rxBdIndex] = m;
@@ -558,6 +586,4 @@
        */
       while ((status = rxBd->status) & M8xx_BD_EMPTY) {
-        rtems_event_set events;
-
         /*
          * Unmask RXF (Full frame received) event
@@ -565,8 +591,5 @@
         m8xx.fec.ievent |= M8xx_FEC_IEVENT_RFINT;
 
-        rtems_bsdnet_event_receive (INTERRUPT_EVENT,
-                                    RTEMS_WAIT|RTEMS_EVENT_ANY,
-                                    RTEMS_NO_TIMEOUT,
-                                    &events);
+        fec_wait_for_event (sc, INTERRUPT_EVENT);
       }
     }
@@ -580,5 +603,4 @@
        * FIXME: Packet filtering hook could be done here.
        */
-      struct ether_header *eh;
 
       /*
@@ -588,16 +610,13 @@
 
       m = sc->rxMbuf[rxBdIndex];
-      m->m_len = m->m_pkthdr.len = rxBd->length -
-        sizeof(uint32_t) -
-        sizeof(struct ether_header);
-      eh = mtod (m, struct ether_header *);
-      m->m_data += sizeof(struct ether_header);
-      ether_input (ifp, eh, m);
+      m->m_len = m->m_pkthdr.len = rxBd->length - sizeof(uint32_t);
+      FEC_UNLOCK(sc);
+      (*sc->ifp->if_input)(sc->ifp, m);
+      FEC_LOCK(sc);
 
       /*
        * Allocate a new mbuf
        */
-      MGETHDR (m, M_WAIT, MT_DATA);
-      MCLGET (m, M_WAIT);
+      m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
       m->m_pkthdr.rcvif = ifp;
       sc->rxMbuf[rxBdIndex] = m;
@@ -652,5 +671,5 @@
   int i;
   int nRetired;
-  struct mbuf *m, *n;
+  struct mbuf *m;
 
   i = sc->txBdTail;
@@ -674,17 +693,17 @@
                     M8xx_BD_UNDERRUN)) {
         if (status & M8xx_BD_LATE_COLLISION)
-          enet_driver[0].txLateCollision++;
+          sc->txLateCollision++;
         if (status & M8xx_BD_RETRY_LIMIT)
-          enet_driver[0].txRetryLimit++;
+          sc->txRetryLimit++;
         if (status & M8xx_BD_UNDERRUN)
-          enet_driver[0].txUnderrun++;
+          sc->txUnderrun++;
 
       }
       if (status & M8xx_BD_DEFER)
-        enet_driver[0].txDeferred++;
+        sc->txDeferred++;
       if (status & M8xx_BD_HEARTBEAT)
-        enet_driver[0].txHeartbeat++;
+        sc->txHeartbeat++;
       if (status & M8xx_BD_CARRIER_LOST)
-        enet_driver[0].txLostCarrier++;
+        sc->txLostCarrier++;
     }
     nRetired++;
@@ -698,5 +717,5 @@
         nRetired--;
         m = sc->txMbuf[sc->txBdTail];
-        MFREE (m, n);
+        m_free(m);
         if (++sc->txBdTail == sc->txBdCount)
           sc->txBdTail = 0;
@@ -708,7 +727,6 @@
 }
 
-static void fec_sendpacket (struct ifnet *ifp, struct mbuf *m)
-{
-  struct m8xx_fec_enet_struct *sc = ifp->if_softc;
+static void fec_sendpacket (struct m8xx_fec_enet_struct *sc, struct mbuf *m)
+{
   volatile m8xxBufferDescriptor_t *firstTxBd, *txBd;
   /*  struct mbuf *l = NULL; */
@@ -754,6 +772,4 @@
       m8xx_fec_Enet_retire_tx_bd (sc);
       while ((sc->txBdActiveCount + nAdded) == sc->txBdCount) {
-        rtems_event_set events;
-
         /*
          * Unmask TXB (buffer transmitted) and
@@ -761,8 +777,5 @@
          */
         m8xx.fec.ievent |= M8xx_FEC_IEVENT_TFINT;
-        rtems_bsdnet_event_receive (INTERRUPT_EVENT,
-                                    RTEMS_WAIT|RTEMS_EVENT_ANY,
-                                    RTEMS_NO_TIMEOUT,
-                                    &events);
+        fec_wait_for_event (sc, INTERRUPT_EVENT);
         m8xx_fec_Enet_retire_tx_bd (sc);
       }
@@ -808,7 +821,5 @@
        * Just toss empty mbufs
        */
-      struct mbuf *n;
-      MFREE (m, n);
-      m = n;
+      m = m_free (m);
       /*
 	if (l != NULL)
@@ -838,7 +849,8 @@
 {
   struct m8xx_fec_enet_struct *sc = (struct m8xx_fec_enet_struct *)arg;
-  struct ifnet *ifp = &sc->arpcom.ac_if;
+  struct ifnet *ifp = sc->ifp;
   struct mbuf *m;
-  rtems_event_set events;
+
+  FEC_LOCK(sc);
 
   for (;;) {
@@ -846,8 +858,5 @@
      * Wait for packet
      */
-    rtems_bsdnet_event_receive (START_TRANSMIT_EVENT,
-                                RTEMS_EVENT_ANY | RTEMS_WAIT,
-                                RTEMS_NO_TIMEOUT,
-                                &events);
+    fec_wait_for_event (sc, START_TRANSMIT_EVENT);
 
     /*
@@ -861,13 +870,23 @@
       if (!m)
         break;
-      fec_sendpacket (ifp, m);
+      fec_sendpacket (sc, m);
     }
-    ifp->if_flags &= ~IFF_OACTIVE;
-  }
-}
+    ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+  }
+}
+
+static void fec_watchdog (void *arg)
+{
+  struct m8xx_fec_enet_struct *sc = arg;
+
+  fec_mode_adapt(sc->ifp);
+  callout_reset(&sc->watchdogCallout, FEC_WATCHDOG_TIMEOUT * hz,
+		fec_watchdog, sc);
+}
+
 static void fec_init (void *arg)
 {
   struct m8xx_fec_enet_struct *sc = arg;
-  struct ifnet *ifp = &sc->arpcom.ac_if;
+  struct ifnet *ifp = sc->ifp;
 
   if (sc->txDaemonTid == 0) {
@@ -902,10 +921,10 @@
    * init timer so the "watchdog function gets called periodically
    */
-  ifp->if_timer    = 1;
+  callout_reset(&sc->watchdogCallout, hz, fec_watchdog, sc);
 
   /*
    * Tell the world that we're running.
    */
-  ifp->if_flags |= IFF_RUNNING;
+  ifp->if_drv_flags |= IFF_DRV_RUNNING;
 
   /*
@@ -923,13 +942,13 @@
   struct m8xx_fec_enet_struct *sc = ifp->if_softc;
 
-  rtems_bsdnet_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT);
-  ifp->if_flags |= IFF_OACTIVE;
-}
-
-static void fec_stop (struct m8xx_fec_enet_struct *sc)
-{
-  struct ifnet *ifp = &sc->arpcom.ac_if;
-
-  ifp->if_flags &= ~IFF_RUNNING;
+  FEC_LOCK(sc);
+  ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+  FEC_UNLOCK(sc);
+  fec_send_event (sc->txDaemonTid, START_TRANSMIT_EVENT);
+}
+
+static void fec_stop (struct ifnet *ifp)
+{
+  ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 
   /*
@@ -944,19 +963,4 @@
 static void fec_enet_stats (struct m8xx_fec_enet_struct *sc)
 {
-  int media;
-  int result;
-  /*
-   * fetch/print media info
-   */
-  media = IFM_MAKEWORD(0,0,0,sc->phy_default); /* fetch from default phy */
-
-  result = fec_ioctl(&(sc->arpcom.ac_if),
-		     SIOCGIFMEDIA,
-		     (caddr_t)&media);
-  if (result == 0) {
-    rtems_ifmedia2str(media,NULL,0);
-    printf ("\n");
-  }
-
   printf ("      Rx Interrupts:%-8lu", sc->rxInterrupts);
   printf ("       Not First:%-8lu", sc->rxNotFirst);
@@ -993,27 +997,17 @@
     rtems_mii_ioctl (&(sc->mdio_info),sc,command,(void *)data);
     break;
-  case SIOCGIFADDR:
-  case SIOCSIFADDR:
-    ether_ioctl (ifp, command, data);
-    break;
 
   case SIOCSIFFLAGS:
-    switch (ifp->if_flags & (IFF_UP | IFF_RUNNING)) {
-    case IFF_RUNNING:
-      fec_stop (sc);
-      break;
-
-    case IFF_UP:
-      fec_init (sc);
-      break;
-
-    case IFF_UP | IFF_RUNNING:
-      fec_stop (sc);
-      fec_init (sc);
-      break;
-
-    default:
-      break;
+    FEC_LOCK(sc);
+    if (ifp->if_flags & IFF_UP) {
+      if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+        fec_init (sc);
+      }
+    } else {
+      if (ifp->if_drv_flags & IFF_DRV_RUNNING)
+        fec_stop (ifp);
     }
+    sc->if_flags = ifp->if_flags;
+    FEC_UNLOCK(sc);
     break;
 
@@ -1026,5 +1020,5 @@
      */
   default:
-    error = EINVAL;
+    error = ether_ioctl(ifp, command, data);
     break;
   }
@@ -1119,83 +1113,30 @@
 }
 
-/*=========================================================================*\
-| Function:                                                                 |
-\*-------------------------------------------------------------------------*/
-static void fec_watchdog
-(
-/*-------------------------------------------------------------------------*\
-| Purpose:                                                                  |
-|   periodically poll the PHY. if mode has changed,                         |
-|  then adjust the FEC settings                                             |
-+---------------------------------------------------------------------------+
-| Input Parameters:                                                         |
-\*-------------------------------------------------------------------------*/
- struct ifnet *ifp
-)
-/*-------------------------------------------------------------------------*\
-| Return Value:                                                             |
-|    1, if success                                                          |
-\*=========================================================================*/
-{
-  fec_mode_adapt(ifp);
-  ifp->if_timer    = FEC_WATCHDOG_TIMEOUT;
-}
-
-int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config)
+static int fec_attach (device_t dev)
 {
   struct m8xx_fec_enet_struct *sc;
   struct ifnet *ifp;
-  int mtu;
-  int unitNumber;
-  char *unitName;
-  static const uint8_t maczero[] ={0,0,0,0,0,0};
-
-  /*
-   * Parse driver name
-   */
-  if ((unitNumber = rtems_bsdnet_parse_driver_name (config, &unitName)) < 0)
-    return 0;
-
-  /*
-   * Is driver free?
-   */
-  if ((unitNumber <= 0) || (unitNumber > NIFACES)) {
-    printk ("Bad FEC unit number.\n");
-    return 0;
-  }
-  sc = &enet_driver[unitNumber - 1];
-  ifp = &sc->arpcom.ac_if;
-  if (ifp->if_softc != NULL) {
-    printk ("Driver already in use.\n");
-    return 0;
-  }
-
-  /*
-   * Process options
-   */
-  if (config->hardware_address) {
-    memcpy (sc->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
-  }
-#ifdef BSP_HAS_TQMMON
-  else if(0 != memcmp(maczero,TQM_BD_INFO.eth_addr,ETHER_ADDR_LEN)) {
-    memcpy (sc->arpcom.ac_enaddr, TQM_BD_INFO.eth_addr, ETHER_ADDR_LEN);
-  }
-#endif
-  else {
-    /* FIXME to read the enaddr from NVRAM */
-  }
-  if (config->mtu)
-    mtu = config->mtu;
-  else
-    mtu = ETHERMTU;
-  if (config->rbuf_count)
-    sc->rxBdCount = config->rbuf_count;
-  else
-    sc->rxBdCount = RX_BUF_COUNT;
-  if (config->xbuf_count)
-    sc->txBdCount = config->xbuf_count;
-  else
-    sc->txBdCount = TX_BUF_COUNT * TX_BD_PER_BUF;
-  sc->acceptBroadcast = !config->ignore_broadcast;
+  int unitNumber = device_get_unit(dev);
+  uint8_t hwaddr[ETHER_ADDR_LEN];
+
+  /*
+   * enable FEC functionality at hardware pins*
+   * PD[3-15] are FEC pins
+   */
+  m8xx.pdpar |= 0x1fff;
+  m8xx.pddir |= 0x1fff;
+
+  rtems_bsd_get_mac_address(device_get_name(dev), device_get_unit(dev),
+			    hwaddr);
+
+  sc = device_get_softc(dev);
+  sc->dev = dev;
+  sc->ifp = ifp = if_alloc(IFT_ETHER);
+
+  mtx_init(&sc->mtx, device_get_nameunit(sc->dev), MTX_NETWORK_LOCK, MTX_DEF);
+  callout_init_mtx(&sc->watchdogCallout, &sc->mtx, 0);
+
+  sc->rxBdCount = RX_BUF_COUNT;
+  sc->txBdCount = TX_BUF_COUNT * TX_BD_PER_BUF;
 
   /*
@@ -1214,35 +1155,53 @@
    */
   ifp->if_softc = sc;
-  ifp->if_unit = unitNumber;
-  ifp->if_name = unitName;
-  ifp->if_mtu = mtu;
+  if_initname(ifp, device_get_name(dev), device_get_unit(dev));
   ifp->if_init = fec_init;
   ifp->if_ioctl = fec_ioctl;
   ifp->if_start = m8xx_fec_enet_start;
-  ifp->if_output = ether_output;
-  ifp->if_watchdog =  fec_watchdog; /* XXX: timer is set in "init" */
-  ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
-  if (ifp->if_snd.ifq_maxlen == 0)
-    ifp->if_snd.ifq_maxlen = ifqmaxlen;
+  ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX;
+  IFQ_SET_MAXLEN(&ifp->if_snd, sc->txBdCount - 1);
+  ifp->if_snd.ifq_drv_maxlen = sc->txBdCount - 1;
+  IFQ_SET_READY(&ifp->if_snd);
 
   /*
    * Attach the interface
    */
-  if_attach (ifp);
-  ether_ifattach (ifp);
-  return 1;
+  ether_ifattach (ifp, hwaddr);
+  return 0;
 };
 
-int rtems_fec_enet_driver_attach(struct rtems_bsdnet_ifconfig *config,
-				 int attaching)
-{
-  /*
-   * enable FEC functionality at hardware pins*
-   * PD[3-15] are FEC pins
-   */
-  if (attaching) {
-    m8xx.pdpar |= 0x1fff;
-    m8xx.pddir |= 0x1fff;
-  }
-  return rtems_fec_driver_attach(config);
-}
+static int
+fec_probe(device_t dev)
+{
+	int unit = device_get_unit(dev);
+	int error;
+
+	if (unit >= 0 && unit < NIFACES) {
+		error = BUS_PROBE_DEFAULT;
+	} else {
+		error = ENXIO;
+	}
+
+	return (error);
+}
+
+static device_method_t fec_methods[] = {
+	/* Device interface */
+	DEVMETHOD(device_probe,		fec_probe),
+	DEVMETHOD(device_attach,	fec_attach),
+
+	DEVMETHOD_END
+};
+
+static driver_t fec_nexus_driver = {
+	"fec",
+	fec_methods,
+	sizeof(struct m8xx_fec_enet_struct)
+};
+
+static devclass_t fec_devclass;
+DRIVER_MODULE(fec, nexus, fec_nexus_driver, fec_devclass, 0, 0);
+MODULE_DEPEND(fec, nexus, 1, 1, 1);
+MODULE_DEPEND(fec, ether, 1, 1, 1);
+
+#endif /* LIBBSP_POWERPC_TQM8XX_BSP_H */
