Patchwork [U-Boot,v2,01/67] net: dm: Pull out ops from struct eth_device

login
register
mail settings
Submitter Tomas Hlavacek
Date Nov. 21, 2012, 1:22 p.m.
Message ID <1353504238-11277-2-git-send-email-tmshlvck@gmail.com>
Download mbox | patch
Permalink /patch/200694/
State Changes Requested
Delegated to: Joe Hershberger
Headers show

Comments

Tomas Hlavacek - Nov. 21, 2012, 1:22 p.m.
Add struct eth_ops into include/net.h.
Pull out ops (function pointers to functions init, send recv, halt etc.)
from struct eth_device to the new struct eth_ops.
Fix ops usage in all affected drivers.

This is the first preparation step for DM in the net subsystem. Idea is
to have pointers to the ops functions stored in a separate static
structure. The structure then will be passed to the DM driver instance on
driver init.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/mips/cpu/mips32/au1x00/au1x00_eth.c |   10 +++++-----
 arch/powerpc/cpu/mpc8220/fec.c           |    8 ++++----
 arch/powerpc/cpu/mpc8260/ether_fcc.c     |   10 +++++-----
 arch/powerpc/cpu/mpc8260/ether_scc.c     |    8 ++++----
 arch/powerpc/cpu/mpc85xx/ether_fcc.c     |   10 +++++-----
 arch/powerpc/cpu/mpc8xx/fec.c            |    8 ++++----
 arch/powerpc/cpu/mpc8xx/scc.c            |    8 ++++----
 board/Marvell/db64360/mv_eth.c           |    8 ++++----
 board/Marvell/db64460/mv_eth.c           |    8 ++++----
 board/davinci/da8xxevm/da830evm.c        |    2 +-
 board/esd/cpci750/mv_eth.c               |    8 ++++----
 board/evb64260/eth.c                     |    8 ++++----
 board/prodrive/p3mx/mv_eth.c             |    8 ++++----
 drivers/net/4xx_enet.c                   |    8 ++++----
 drivers/net/altera_tse.c                 |   10 +++++-----
 drivers/net/armada100_fec.c              |    8 ++++----
 drivers/net/at91_emac.c                  |   10 +++++-----
 drivers/net/ax88180.c                    |    8 ++++----
 drivers/net/bfin_mac.c                   |   10 +++++-----
 drivers/net/calxedaxgmac.c               |    8 ++++----
 drivers/net/cpsw.c                       |    8 ++++----
 drivers/net/cs8900.c                     |    8 ++++----
 drivers/net/davinci_emac.c               |   10 +++++-----
 drivers/net/dc2114x.c                    |    8 ++++----
 drivers/net/designware.c                 |   10 +++++-----
 drivers/net/dm9000x.c                    |    8 ++++----
 drivers/net/dnet.c                       |   10 +++++-----
 drivers/net/e1000.c                      |    8 ++++----
 drivers/net/eepro100.c                   |    8 ++++----
 drivers/net/enc28j60.c                   |   10 +++++-----
 drivers/net/ep93xx_eth.c                 |    8 ++++----
 drivers/net/ethoc.c                      |   10 +++++-----
 drivers/net/fec_mxc.c                    |   10 +++++-----
 drivers/net/fm/eth.c                     |    8 ++++----
 drivers/net/fsl_mcdmafec.c               |    8 ++++----
 drivers/net/ftgmac100.c                  |    8 ++++----
 drivers/net/ftmac100.c                   |    8 ++++----
 drivers/net/greth.c                      |    8 ++++----
 drivers/net/inca-ip_sw.c                 |    8 ++++----
 drivers/net/ks8695eth.c                  |    8 ++++----
 drivers/net/lan91c96.c                   |    8 ++++----
 drivers/net/macb.c                       |   10 +++++-----
 drivers/net/mcffec.c                     |    8 ++++----
 drivers/net/mpc512x_fec.c                |    8 ++++----
 drivers/net/mpc5xxx_fec.c                |    8 ++++----
 drivers/net/mvgbe.c                      |   10 +++++-----
 drivers/net/natsemi.c                    |    8 ++++----
 drivers/net/ne2000_base.c                |    8 ++++----
 drivers/net/npe/npe.c                    |    8 ++++----
 drivers/net/ns8382x.c                    |    8 ++++----
 drivers/net/pcnet.c                      |    8 ++++----
 drivers/net/plb2800_eth.c                |    8 ++++----
 drivers/net/rtl8139.c                    |   10 +++++-----
 drivers/net/rtl8169.c                    |    8 ++++----
 drivers/net/sh_eth.c                     |    8 ++++----
 drivers/net/smc91111.c                   |   10 +++++-----
 drivers/net/smc911x.c                    |    8 ++++----
 drivers/net/tsec.c                       |   10 +++++-----
 drivers/net/tsi108_eth.c                 |    8 ++++----
 drivers/net/uli526x.c                    |    8 ++++----
 drivers/net/xilinx_axi_emac.c            |   10 +++++-----
 drivers/net/xilinx_emaclite.c            |    8 ++++----
 drivers/net/xilinx_ll_temac.c            |   14 +++++++-------
 drivers/net/zynq_gem.c                   |   10 +++++-----
 drivers/qe/uec.c                         |    8 ++++----
 drivers/usb/eth/asix.c                   |   10 +++++-----
 drivers/usb/eth/smsc95xx.c               |   10 +++++-----
 include/net.h                            |   17 +++++++++++------
 net/eth.c                                |   16 ++++++++--------
 69 files changed, 308 insertions(+), 303 deletions(-)

Patch

diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
index ac03a45..2909fb3 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
@@ -295,11 +295,11 @@  int au1x00_enet_initialize(bd_t *bis){
 
 	sprintf(dev->name, "Au1X00 ethernet");
 	dev->iobase = 0;
-	dev->priv   = 0;
-	dev->init   = au1x00_init;
-	dev->halt   = au1x00_halt;
-	dev->send   = au1x00_send;
-	dev->recv   = au1x00_recv;
+	dev->priv = 0;
+	dev->eo->init = au1x00_init;
+	dev->eo->halt = au1x00_halt;
+	dev->eo->send = au1x00_send;
+	dev->eo->recv = au1x00_recv;
 
 	eth_register(dev);
 
diff --git a/arch/powerpc/cpu/mpc8220/fec.c b/arch/powerpc/cpu/mpc8220/fec.c
index aaf9be1..9d6fcc1 100644
--- a/arch/powerpc/cpu/mpc8220/fec.c
+++ b/arch/powerpc/cpu/mpc8220/fec.c
@@ -833,10 +833,10 @@  int mpc8220_fec_initialize (bd_t * bis)
 
 	dev->priv = (void *) fec;
 	dev->iobase = MMAP_FEC1;
-	dev->init = mpc8220_fec_init;
-	dev->halt = mpc8220_fec_halt;
-	dev->send = mpc8220_fec_send;
-	dev->recv = mpc8220_fec_recv;
+	dev->eo->init = mpc8220_fec_init;
+	dev->eo->halt = mpc8220_fec_halt;
+	dev->eo->send = mpc8220_fec_send;
+	dev->eo->recv = mpc8220_fec_recv;
 
 	sprintf (dev->name, "FEC");
 	eth_register (dev);
diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c
index 1853451..6b78235 100644
--- a/arch/powerpc/cpu/mpc8260/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c
@@ -384,11 +384,11 @@  int fec_initialize(bd_t *bis)
 
 		sprintf(dev->name, "FCC%d",
 			ether_fcc_info[i].ether_index + 1);
-		dev->priv   = &ether_fcc_info[i];
-		dev->init   = fec_init;
-		dev->halt   = fec_halt;
-		dev->send   = fec_send;
-		dev->recv   = fec_recv;
+		dev->priv = &ether_fcc_info[i];
+		dev->eo->init = fec_init;
+		dev->eo->halt = fec_halt;
+		dev->eo->send = fec_send;
+		dev->eo->recv = fec_recv;
 
 		eth_register(dev);
 
diff --git a/arch/powerpc/cpu/mpc8260/ether_scc.c b/arch/powerpc/cpu/mpc8260/ether_scc.c
index 3c71219..e56bfdf 100644
--- a/arch/powerpc/cpu/mpc8260/ether_scc.c
+++ b/arch/powerpc/cpu/mpc8260/ether_scc.c
@@ -372,10 +372,10 @@  int mpc82xx_scc_enet_initialize(bd_t *bis)
 	memset(dev, 0, sizeof *dev);
 
 	sprintf(dev->name, "SCC");
-	dev->init   = sec_init;
-	dev->halt   = sec_halt;
-	dev->send   = sec_send;
-	dev->recv   = sec_rx;
+	dev->eo->init   = sec_init;
+	dev->eo->halt   = sec_halt;
+	dev->eo->send   = sec_send;
+	dev->eo->recv   = sec_rx;
 
 	eth_register(dev);
 
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
index 7d372aa..3b9eafa 100644
--- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
@@ -447,11 +447,11 @@  int fec_initialize(bd_t *bis)
 
 		sprintf(dev->name, "FCC%d",
 			ether_fcc_info[i].ether_index + 1);
-		dev->priv   = &ether_fcc_info[i];
-		dev->init   = fec_init;
-		dev->halt   = fec_halt;
-		dev->send   = fec_send;
-		dev->recv   = fec_recv;
+		dev->priv = &ether_fcc_info[i];
+		dev->eo->init = fec_init;
+		dev->eo->halt = fec_halt;
+		dev->eo->send = fec_send;
+		dev->eo->recv = fec_recv;
 
 		eth_register(dev);
 
diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c
index b348a98..5934d92 100644
--- a/arch/powerpc/cpu/mpc8xx/fec.c
+++ b/arch/powerpc/cpu/mpc8xx/fec.c
@@ -178,10 +178,10 @@  int fec_initialize(bd_t *bis)
 		efis->actual_phy_addr = -1;
 
 		dev->priv = efis;
-		dev->init = fec_init;
-		dev->halt = fec_halt;
-		dev->send = fec_send;
-		dev->recv = fec_recv;
+		dev->eo->init = fec_init;
+		dev->eo->halt = fec_halt;
+		dev->eo->send = fec_send;
+		dev->eo->recv = fec_recv;
 
 		eth_register(dev);
 
diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c
index 2c93e24..801c689 100644
--- a/arch/powerpc/cpu/mpc8xx/scc.c
+++ b/arch/powerpc/cpu/mpc8xx/scc.c
@@ -80,10 +80,10 @@  int scc_initialize(bd_t *bis)
 	sprintf(dev->name, "SCC");
 	dev->iobase = 0;
 	dev->priv   = 0;
-	dev->init   = scc_init;
-	dev->halt   = scc_halt;
-	dev->send   = scc_send;
-	dev->recv   = scc_recv;
+	dev->eo->init = scc_init;
+	dev->eo->halt = scc_halt;
+	dev->eo->send = scc_send;
+	dev->eo->recv = scc_recv;
 
 	eth_register(dev);
 
diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index 1874cd1..226b964 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -259,10 +259,10 @@  void mv6436x_eth_initialize (bd_t * bis)
 		/* ronen - set the MAC addr in the HW */
 		eth_port_uc_addr_set (devnum, dev->enetaddr, 0);
 
-		dev->init = (void *) db64360_eth_probe;
-		dev->halt = (void *) ethernet_phy_reset;
-		dev->send = (void *) db64360_eth_transmit;
-		dev->recv = (void *) db64360_eth_poll;
+		dev->eo->init = (void *) db64360_eth_probe;
+		dev->eo->halt = (void *) ethernet_phy_reset;
+		dev->eo->send = (void *) db64360_eth_transmit;
+		dev->eo->recv = (void *) db64360_eth_poll;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *) ethernet_private;
diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index a24a7e8..df09be1 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -259,10 +259,10 @@  void mv6446x_eth_initialize (bd_t * bis)
 		/* ronen - set the MAC addr in the HW */
 		eth_port_uc_addr_set (devnum, dev->enetaddr, 0);
 
-		dev->init = (void *) db64460_eth_probe;
-		dev->halt = (void *) ethernet_phy_reset;
-		dev->send = (void *) db64460_eth_transmit;
-		dev->recv = (void *) db64460_eth_poll;
+		dev->eo->init = (void *) db64460_eth_probe;
+		dev->eo->halt = (void *) ethernet_phy_reset;
+		dev->eo->send = (void *) db64460_eth_transmit;
+		dev->eo->recv = (void *) db64460_eth_poll;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *)ethernet_private;
diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c
index c45c94b..6463a08 100644
--- a/board/davinci/da8xxevm/da830evm.c
+++ b/board/davinci/da8xxevm/da830evm.c
@@ -284,7 +284,7 @@  int board_eth_init(bd_t *bis)
 
 	/* provide the resulting addr to the driver */
 	memcpy(dev->enetaddr, mac_addr, 6);
-	dev->write_hwaddr(dev);
+	dev->eo->write_hwaddr(dev);
 
 	return 0;
 }
diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index 9455b62..8be3f9b 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -259,10 +259,10 @@  void mv6436x_eth_initialize (bd_t * bis)
 		/* ronen - set the MAC addr in the HW */
 		eth_port_uc_addr_set (devnum, dev->enetaddr, 0);
 
-		dev->init = (void *) db64360_eth_probe;
-		dev->halt = (void *) ethernet_phy_reset;
-		dev->send = (void *) db64360_eth_transmit;
-		dev->recv = (void *) db64360_eth_poll;
+		dev->eo->init = (void *) db64360_eth_probe;
+		dev->eo->halt = (void *) ethernet_phy_reset;
+		dev->eo->send = (void *) db64360_eth_transmit;
+		dev->eo->recv = (void *) db64360_eth_poll;
 
 		ethernet_private =
 			calloc (sizeof (*ethernet_private), 1);
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index a3a3276..783e0ae 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -720,10 +720,10 @@  gt6426x_eth_initialize(bd_t *bis)
 				s = (*e) ? e+1 : e;
 		}
 
-		dev->init = (void*)gt6426x_eth_probe;
-		dev->halt = (void*)gt6426x_eth_reset;
-		dev->send = (void*)gt6426x_eth_transmit;
-		dev->recv = (void*)gt6426x_eth_poll;
+		dev->eo->init = (void *)gt6426x_eth_probe;
+		dev->eo->halt = (void *)gt6426x_eth_reset;
+		dev->eo->send = (void *)gt6426x_eth_transmit;
+		dev->eo->recv = (void *)gt6426x_eth_poll;
 
 		p = calloc( sizeof(*p), 1 );
 		dev->priv = (void*)p;
diff --git a/board/prodrive/p3mx/mv_eth.c b/board/prodrive/p3mx/mv_eth.c
index 06f816d..69c2dba 100644
--- a/board/prodrive/p3mx/mv_eth.c
+++ b/board/prodrive/p3mx/mv_eth.c
@@ -309,10 +309,10 @@  void mv6446x_eth_initialize (bd_t * bis)
 		/* ronen - set the MAC addr in the HW */
 		eth_port_uc_addr_set (devnum, dev->enetaddr, 0);
 
-		dev->init = (void *) db64460_eth_probe;
-		dev->halt = (void *) ethernet_phy_reset;
-		dev->send = (void *) db64460_eth_transmit;
-		dev->recv = (void *) db64460_eth_poll;
+		dev->eo->init = (void *) db64460_eth_probe;
+		dev->eo->halt = (void *) ethernet_phy_reset;
+		dev->eo->send = (void *) db64460_eth_transmit;
+		dev->eo->recv = (void *) db64460_eth_poll;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *)ethernet_private;
diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 7c6e362..27b66dd 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -2023,10 +2023,10 @@  int ppc_4xx_eth_initialize (bd_t * bis)
 
 		sprintf (dev->name, "ppc_4xx_eth%d", eth_num - CONFIG_EMAC_NR_START);
 		dev->priv = (void *) hw;
-		dev->init = ppc_4xx_eth_init;
-		dev->halt = ppc_4xx_eth_halt;
-		dev->send = ppc_4xx_eth_send;
-		dev->recv = ppc_4xx_eth_rx;
+		dev->eo->init = ppc_4xx_eth_init;
+		dev->eo->halt = ppc_4xx_eth_halt;
+		dev->eo->send = ppc_4xx_eth_send;
+		dev->eo->recv = ppc_4xx_eth_rx;
 
 		eth_register(dev);
 
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index de517f8..ee1a1f6 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -951,11 +951,11 @@  int altera_tse_initialize(u8 dev_num, int mac_base,
 
 	/* init eth structure */
 	dev->priv = priv;
-	dev->init = tse_eth_init;
-	dev->halt = tse_eth_halt;
-	dev->send = tse_eth_send;
-	dev->recv = tse_eth_rx;
-	dev->write_hwaddr = tse_set_mac_address;
+	dev->eo->init = tse_eth_init;
+	dev->eo->halt = tse_eth_halt;
+	dev->eo->send = tse_eth_send;
+	dev->eo->recv = tse_eth_rx;
+	dev->eo->write_hwaddr = tse_set_mac_address;
 	sprintf(dev->name, "%s-%hu", "ALTERA_TSE", dev_num);
 
 	eth_register(dev);
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index ed7cf20..f256381 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -718,10 +718,10 @@  int armada100_fec_register(unsigned long base_addr)
 	/* must be less than sizeof(dev->name) */
 	strcpy(dev->name, "armd-fec0");
 
-	dev->init = armdfec_init;
-	dev->halt = armdfec_halt;
-	dev->send = armdfec_send;
-	dev->recv = armdfec_recv;
+	dev->eo->init = armdfec_init;
+	dev->eo->halt = armdfec_halt;
+	dev->eo->send = armdfec_send;
+	dev->eo->recv = armdfec_recv;
 
 	eth_register(dev);
 
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 2fa6b68..3395dcc 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -518,11 +518,11 @@  int at91emac_register(bd_t *bis, unsigned long iobase)
 	sprintf(dev->name, "emac");
 	dev->iobase = iobase;
 	dev->priv = emacfix;
-	dev->init = at91emac_init;
-	dev->halt = at91emac_halt;
-	dev->send = at91emac_send;
-	dev->recv = at91emac_recv;
-	dev->write_hwaddr = at91emac_write_hwaddr;
+	dev->eo->init = at91emac_init;
+	dev->eo->halt = at91emac_halt;
+	dev->eo->send = at91emac_send;
+	dev->eo->recv = at91emac_recv;
+	dev->eo->write_hwaddr = at91emac_write_hwaddr;
 
 	eth_register(dev);
 
diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index f501768..464f261 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -725,10 +725,10 @@  int ax88180_initialize (bd_t * bis)
 	sprintf (dev->name, "ax88180");
 	dev->iobase = AX88180_BASE;
 	dev->priv = priv;
-	dev->init = ax88180_init;
-	dev->halt = ax88180_halt;
-	dev->send = ax88180_send;
-	dev->recv = ax88180_recv;
+	dev->eo->init = ax88180_init;
+	dev->eo->halt = ax88180_halt;
+	dev->eo->send = ax88180_send;
+	dev->eo->recv = ax88180_recv;
 
 	priv->BusWidth = BUS_WIDTH_32;
 	priv->PadSize = 3;
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c63398e..ef4736f 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -103,11 +103,11 @@  int bfin_EMAC_initialize(bd_t *bis)
 
 	dev->iobase = 0;
 	dev->priv = 0;
-	dev->init = bfin_EMAC_init;
-	dev->halt = bfin_EMAC_halt;
-	dev->send = bfin_EMAC_send;
-	dev->recv = bfin_EMAC_recv;
-	dev->write_hwaddr = bfin_EMAC_setup_addr;
+	dev->eo->init = bfin_EMAC_init;
+	dev->eo->halt = bfin_EMAC_halt;
+	dev->eo->send = bfin_EMAC_send;
+	dev->eo->recv = bfin_EMAC_recv;
+	dev->eo->write_hwaddr = bfin_EMAC_setup_addr;
 
 	eth_register(dev);
 
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index e3553d6..2346feb 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -543,10 +543,10 @@  int calxedaxgmac_initialize(u32 id, ulong base_addr)
 	macaddr[0] = readl(&regs->macaddr[0].lo);
 	memcpy(dev->enetaddr, macaddr, 6);
 
-	dev->init = xgmac_init;
-	dev->send = xgmac_tx;
-	dev->recv = xgmac_rx;
-	dev->halt = xgmac_halt;
+	dev->eo->init = xgmac_init;
+	dev->eo->send = xgmac_tx;
+	dev->eo->recv = xgmac_rx;
+	dev->eo->halt = xgmac_halt;
 
 	eth_register(dev);
 
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index af3d859..c120d4e 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -974,10 +974,10 @@  int cpsw_register(struct cpsw_platform_data *data)
 
 	strcpy(dev->name, "cpsw");
 	dev->iobase	= 0;
-	dev->init	= cpsw_init;
-	dev->halt	= cpsw_halt;
-	dev->send	= cpsw_send;
-	dev->recv	= cpsw_recv;
+	dev->eo->init	= cpsw_init;
+	dev->eo->halt	= cpsw_halt;
+	dev->eo->send	= cpsw_send;
+	dev->eo->recv	= cpsw_recv;
 	dev->priv	= priv;
 
 	eth_register(dev);
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 6aaa0cf..65a4254 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -320,10 +320,10 @@  int cs8900_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	dev->init = cs8900_init;
-	dev->halt = cs8900_halt;
-	dev->send = cs8900_send;
-	dev->recv = cs8900_recv;
+	dev->eo->init = cs8900_init;
+	dev->eo->halt = cs8900_halt;
+	dev->eo->send = cs8900_send;
+	dev->eo->recv = cs8900_recv;
 
 	/* Load MAC address from EEPROM */
 	cs8900_get_enetaddr(dev);
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 1db586d..a221092 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -791,11 +791,11 @@  int davinci_emac_initialize(void)
 	sprintf(dev->name, "DaVinci-EMAC");
 
 	dev->iobase = 0;
-	dev->init = davinci_eth_open;
-	dev->halt = davinci_eth_close;
-	dev->send = davinci_eth_send_packet;
-	dev->recv = davinci_eth_rcv_packet;
-	dev->write_hwaddr = davinci_eth_set_mac_addr;
+	dev->eo->init = davinci_eth_open;
+	dev->eo->halt = davinci_eth_close;
+	dev->eo->send = davinci_eth_send_packet;
+	dev->eo->recv = davinci_eth_rcv_packet;
+	dev->eo->write_hwaddr = davinci_eth_set_mac_addr;
 
 	eth_register(dev);
 
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index d9fcb5a..0361699 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -300,10 +300,10 @@  int dc21x4x_initialize(bd_t *bis)
 		dev->iobase = pci_mem_to_phys(devbusfn, iobase);
 #endif
 		dev->priv   = (void*) devbusfn;
-		dev->init   = dc21x4x_init;
-		dev->halt   = dc21x4x_halt;
-		dev->send   = dc21x4x_send;
-		dev->recv   = dc21x4x_recv;
+		dev->eo->init   = dc21x4x_init;
+		dev->eo->halt   = dc21x4x_halt;
+		dev->eo->send   = dc21x4x_send;
+		dev->eo->recv   = dc21x4x_recv;
 
 		/* Ensure we're not sleeping. */
 		pci_write_config_byte(devbusfn, PCI_CFDA_PSM, WAKEUP);
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index bf21a08..2d92591 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -559,11 +559,11 @@  int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
 	priv->phy_configured = 0;
 	priv->interface = interface;
 
-	dev->init = dw_eth_init;
-	dev->send = dw_eth_send;
-	dev->recv = dw_eth_recv;
-	dev->halt = dw_eth_halt;
-	dev->write_hwaddr = dw_write_hwaddr;
+	dev->eo->init = dw_eth_init;
+	dev->eo->send = dw_eth_send;
+	dev->eo->recv = dw_eth_recv;
+	dev->eo->halt = dw_eth_halt;
+	dev->eo->write_hwaddr = dw_write_hwaddr;
 
 	eth_register(dev);
 
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index f0c4499..bd96948 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -630,10 +630,10 @@  int dm9000_initialize(bd_t *bis)
 	/* Load MAC address from EEPROM */
 	dm9000_get_enetaddr(dev);
 
-	dev->init = dm9000_init;
-	dev->halt = dm9000_halt;
-	dev->send = dm9000_send;
-	dev->recv = dm9000_rx;
+	dev->eo->init = dm9000_init;
+	dev->eo->halt = dm9000_halt;
+	dev->eo->send = dm9000_send;
+	dev->eo->recv = dm9000_rx;
 	sprintf(dev->name, "dm9000");
 
 	eth_register(dev);
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index 944a0c0..be0891f 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -374,13 +374,13 @@  int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	dnet->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "dnet%d", id);
-	netdev->init = dnet_init;
-	netdev->halt = dnet_halt;
-	netdev->send = dnet_send;
-	netdev->recv = dnet_recv;
+	netdev->eo->init = dnet_init;
+	netdev->eo->halt = dnet_halt;
+	netdev->eo->send = dnet_send;
+	netdev->eo->recv = dnet_recv;
 
 	dev_capa = readl(&dnet->regs->VERCAPS) & 0xFFFF;
-	debug("%s: has %smdio, %sirq, %sgigabit, %sdma \n", netdev->name,
+	debug("%s: has %smdio, %sirq, %sgigabit, %sdma\n", netdev->name,
 		(dev_capa & DNET_HAS_MDIO) ? "" : "no ",
 		(dev_capa & DNET_HAS_IRQ) ? "" : "no ",
 		(dev_capa & DNET_HAS_GIGABIT) ? "" : "no ",
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 2d4da4b..c9f9fb3 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -5218,10 +5218,10 @@  e1000_initialize(bd_t * bis)
 		       nic->enetaddr[3], nic->enetaddr[4], nic->enetaddr[5]);
 
 		/* Set up the function pointers and register the device */
-		nic->init = e1000_init;
-		nic->recv = e1000_poll;
-		nic->send = e1000_transmit;
-		nic->halt = e1000_disable;
+		nic->eo->init = e1000_init;
+		nic->eo->recv = e1000_poll;
+		nic->eo->send = e1000_transmit;
+		nic->eo->halt = e1000_disable;
 		eth_register(nic);
 	}
 
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index d2c8277..e3aa720 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -458,10 +458,10 @@  int eepro100_initialize (bd_t * bis)
 		sprintf (dev->name, "i82559#%d", card_number);
 		dev->priv = (void *) devno; /* this have to come before bus_to_phys() */
 		dev->iobase = bus_to_phys (iobase);
-		dev->init = eepro100_init;
-		dev->halt = eepro100_halt;
-		dev->send = eepro100_send;
-		dev->recv = eepro100_recv;
+		dev->eo->init = eepro100_init;
+		dev->eo->halt = eepro100_halt;
+		dev->eo->send = eepro100_send;
+		dev->eo->recv = eepro100_recv;
 
 		eth_register (dev);
 
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index c55667c..95f0b93 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -962,11 +962,11 @@  int enc28j60_initialize(unsigned int bus, unsigned int cs,
 	enc->dev = dev;
 	/* now fill the eth_device object */
 	dev->priv = enc;
-	dev->init = enc_init;
-	dev->halt = enc_halt;
-	dev->send = enc_send;
-	dev->recv = enc_recv;
-	dev->write_hwaddr = enc_write_hwaddr;
+	dev->eo->init = enc_init;
+	dev->eo->halt = enc_halt;
+	dev->eo->send = enc_send;
+	dev->eo->recv = enc_recv;
+	dev->eo->write_hwaddr = enc_write_hwaddr;
 	sprintf(dev->name, "enc%i.%i", bus, cs);
 	eth_register(dev);
 #if defined(CONFIG_CMD_MII)
diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 245ad1c..0b5cb3c 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -499,10 +499,10 @@  int ep93xx_eth_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	dev->init = ep93xx_eth_open;
-	dev->halt = ep93xx_eth_close;
-	dev->send = ep93xx_eth_send_packet;
-	dev->recv = ep93xx_eth_rcv_packet;
+	dev->eo->init = ep93xx_eth_open;
+	dev->eo->halt = ep93xx_eth_close;
+	dev->eo->send = ep93xx_eth_send_packet;
+	dev->eo->recv = ep93xx_eth_rcv_packet;
 
 	sprintf(dev->name, "ep93xx_eth-%hu", dev_num);
 
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index af06d4f..946b8e2 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -499,11 +499,11 @@  int ethoc_initialize(u8 dev_num, int base_addr)
 	memset(dev, 0, sizeof(*dev));
 	dev->priv = priv;
 	dev->iobase = base_addr;
-	dev->init = ethoc_init;
-	dev->halt = ethoc_halt;
-	dev->send = ethoc_send;
-	dev->recv = ethoc_recv;
-	dev->write_hwaddr = ethoc_set_mac_address;
+	dev->eo->init = ethoc_init;
+	dev->eo->halt = ethoc_halt;
+	dev->eo->send = ethoc_send;
+	dev->eo->recv = ethoc_recv;
+	dev->eo->write_hwaddr = ethoc_set_mac_address;
 	sprintf(dev->name, "%s-%hu", "ETHOC", dev_num);
 
 	eth_register(dev);
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 3e232c7..f8a5556 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -943,11 +943,11 @@  static int fec_probe(bd_t *bd, int dev_id, int phy_id, uint32_t base_addr)
 	memset(fec, 0, sizeof(*fec));
 
 	edev->priv = fec;
-	edev->init = fec_init;
-	edev->send = fec_send;
-	edev->recv = fec_recv;
-	edev->halt = fec_halt;
-	edev->write_hwaddr = fec_set_hwaddr;
+	edev->eo->init = fec_init;
+	edev->eo->send = fec_send;
+	edev->eo->recv = fec_recv;
+	edev->eo->halt = fec_halt;
+	edev->eo->write_hwaddr = fec_set_hwaddr;
 
 	fec->eth = (struct ethernet_regs *)base_addr;
 	fec->bd = bd;
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 2b616ad..8d881d4 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -653,10 +653,10 @@  int fm_eth_initialize(struct ccsr_fman *reg, struct fm_eth_info *info)
 	devlist[num_controllers++] = dev;
 	dev->iobase = 0;
 	dev->priv = (void *)fm_eth;
-	dev->init = fm_eth_open;
-	dev->halt = fm_eth_halt;
-	dev->send = fm_eth_send;
-	dev->recv = fm_eth_recv;
+	dev->eo->init = fm_eth_open;
+	dev->eo->halt = fm_eth_halt;
+	dev->eo->send = fm_eth_send;
+	dev->eo->recv = fm_eth_recv;
 	fm_eth->dev = dev;
 	fm_eth->bus = info->bus;
 	fm_eth->phyaddr = info->phy_addr;
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 63842cd..2e70d22 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -533,10 +533,10 @@  int mcdmafec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->init = fec_init;
-		dev->halt = fec_halt;
-		dev->send = fec_send;
-		dev->recv = fec_recv;
+		dev->eo->init = fec_init;
+		dev->eo->halt = fec_halt;
+		dev->eo->send = fec_send;
+		dev->eo->recv = fec_recv;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_DMA_USE_INTSRAM
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 69ba57d..76391c1 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -548,10 +548,10 @@  int ftgmac100_initialize(bd_t *bd)
 
 	sprintf(dev->name, "FTGMAC100");
 	dev->iobase	= CONFIG_FTGMAC100_BASE;
-	dev->init	= ftgmac100_init;
-	dev->halt	= ftgmac100_halt;
-	dev->send	= ftgmac100_send;
-	dev->recv	= ftgmac100_recv;
+	dev->eo->init	= ftgmac100_init;
+	dev->eo->halt	= ftgmac100_halt;
+	dev->eo->send	= ftgmac100_send;
+	dev->eo->recv	= ftgmac100_recv;
 	dev->priv	= priv;
 
 	eth_register(dev);
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index fdd3ec0..6fd2bde 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -260,10 +260,10 @@  int ftmac100_initialize (bd_t *bd)
 
 	sprintf (dev->name, "FTMAC100");
 	dev->iobase	= CONFIG_FTMAC100_BASE;
-	dev->init	= ftmac100_init;
-	dev->halt	= ftmac100_halt;
-	dev->send	= ftmac100_send;
-	dev->recv	= ftmac100_recv;
+	dev->eo->init	= ftmac100_init;
+	dev->eo->halt	= ftmac100_halt;
+	dev->eo->send	= ftmac100_send;
+	dev->eo->recv	= ftmac100_recv;
 	dev->priv	= priv;
 
 	eth_register (dev);
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 3103a74..150dccf 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -623,10 +623,10 @@  int greth_initialize(bd_t * bis)
 	debug("Found GRETH at %p, irq %d\n", greth->regs, greth->irq);
 	dev->priv = (void *)greth;
 	dev->iobase = (unsigned int)greth->regs;
-	dev->init = greth_init;
-	dev->halt = greth_halt;
-	dev->send = greth_send;
-	dev->recv = greth_recv;
+	dev->eo->init = greth_init;
+	dev->eo->halt = greth_halt;
+	dev->eo->send = greth_send;
+	dev->eo->recv = greth_recv;
 	greth->dev = dev;
 
 	/* Reset Core */
diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index f0f62de..216122d 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -189,10 +189,10 @@  int inca_switch_initialize(bd_t * bis)
 #endif
 
 	sprintf(dev->name, "INCA-IP Switch");
-	dev->init = inca_switch_init;
-	dev->halt = inca_switch_halt;
-	dev->send = inca_switch_send;
-	dev->recv = inca_switch_recv;
+	dev->eo->init = inca_switch_init;
+	dev->eo->halt = inca_switch_halt;
+	dev->eo->send = inca_switch_send;
+	dev->eo->recv = inca_switch_recv;
 
 	eth_register(dev);
 
diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c
index b4904b6..b0703ef 100644
--- a/drivers/net/ks8695eth.c
+++ b/drivers/net/ks8695eth.c
@@ -230,10 +230,10 @@  int ks8695_eth_initialize(void)
 	memset(dev, 0, sizeof(*dev));
 
 	dev->iobase = KS8695_IO_BASE + KS8695_LAN_DMA_TX;
-	dev->init = ks8695_eth_init;
-	dev->halt = ks8695_eth_halt;
-	dev->send = ks8695_eth_send;
-	dev->recv = ks8695_eth_recv;
+	dev->eo->init = ks8695_eth_init;
+	dev->eo->halt = ks8695_eth_halt;
+	dev->eo->send = ks8695_eth_send;
+	dev->eo->recv = ks8695_eth_recv;
 	strcpy(dev->name, "ks8695eth");
 
 	eth_register(dev);
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 11d350e..d87302b 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -806,10 +806,10 @@  int lan91c96_initialize(u8 dev_num, int base_addr)
 	}
 	get_rom_mac(dev, dev->enetaddr);
 
-	dev->init = lan91c96_init;
-	dev->halt = lan91c96_halt;
-	dev->send = lan91c96_send;
-	dev->recv = lan91c96_recv;
+	dev->eo->init = lan91c96_init;
+	dev->eo->halt = lan91c96_halt;
+	dev->eo->send = lan91c96_send;
+	dev->eo->recv = lan91c96_recv;
 	sprintf(dev->name, "%s-%hu", supported_chips[r].name, dev_num);
 
 	eth_register(dev);
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 0e1ced7..2c53902 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -558,11 +558,11 @@  int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	macb->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "macb%d", id);
-	netdev->init = macb_init;
-	netdev->halt = macb_halt;
-	netdev->send = macb_send;
-	netdev->recv = macb_recv;
-	netdev->write_hwaddr = macb_write_hwaddr;
+	netdev->eo->init = macb_init;
+	netdev->eo->halt = macb_halt;
+	netdev->eo->send = macb_send;
+	netdev->eo->recv = macb_recv;
+	netdev->eo->write_hwaddr = macb_write_hwaddr;
 
 	/*
 	 * Do some basic initialization so that we at least can talk
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index ed7459c..0aeb24e 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -572,10 +572,10 @@  int mcffec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->init = fec_init;
-		dev->halt = fec_halt;
-		dev->send = fec_send;
-		dev->recv = fec_recv;
+		dev->eo->init = fec_init;
+		dev->eo->halt = fec_halt;
+		dev->eo->send = fec_send;
+		dev->eo->recv = fec_recv;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_FEC_BUF_USE_SRAM
diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c
index ad57d56..4aa3b28 100644
--- a/drivers/net/mpc512x_fec.c
+++ b/drivers/net/mpc512x_fec.c
@@ -629,10 +629,10 @@  int mpc512x_fec_initialize (bd_t * bis)
 # endif
 	dev->priv = (void *)fec;
 	dev->iobase = (int)&im->fec;
-	dev->init = mpc512x_fec_init;
-	dev->halt = mpc512x_fec_halt;
-	dev->send = mpc512x_fec_send;
-	dev->recv = mpc512x_fec_recv;
+	dev->eo->init = mpc512x_fec_init;
+	dev->eo->halt = mpc512x_fec_halt;
+	dev->eo->send = mpc512x_fec_send;
+	dev->eo->recv = mpc512x_fec_recv;
 
 	sprintf (dev->name, "FEC");
 	eth_register (dev);
diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index 3d180db..73503da 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -915,10 +915,10 @@  int mpc5xxx_fec_initialize(bd_t * bis)
 
 	dev->priv = (void *)fec;
 	dev->iobase = MPC5XXX_FEC;
-	dev->init = mpc5xxx_fec_init;
-	dev->halt = mpc5xxx_fec_halt;
-	dev->send = mpc5xxx_fec_send;
-	dev->recv = mpc5xxx_fec_recv;
+	dev->eo->init = mpc5xxx_fec_init;
+	dev->eo->halt = mpc5xxx_fec_halt;
+	dev->eo->send = mpc5xxx_fec_send;
+	dev->eo->recv = mpc5xxx_fec_recv;
 
 	sprintf(dev->name, "FEC");
 	eth_register(dev);
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 47bf27c..6ddb6d6 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -721,11 +721,11 @@  error1:
 			return -1;
 		}
 
-		dev->init = (void *)mvgbe_init;
-		dev->halt = (void *)mvgbe_halt;
-		dev->send = (void *)mvgbe_send;
-		dev->recv = (void *)mvgbe_recv;
-		dev->write_hwaddr = (void *)mvgbe_write_hwaddr;
+		dev->eo->init = (void *)mvgbe_init;
+		dev->eo->halt = (void *)mvgbe_halt;
+		dev->eo->send = (void *)mvgbe_send;
+		dev->eo->recv = (void *)mvgbe_recv;
+		dev->eo->write_hwaddr = (void *)mvgbe_write_hwaddr;
 
 		eth_register(dev);
 
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 04743bd..4288d1f 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -332,10 +332,10 @@  natsemi_initialize(bd_t * bis)
 		printf("natsemi: NatSemi ns8381[56] @ %#x\n", dev->iobase);
 #endif
 		dev->priv = (void *) devno;
-		dev->init = natsemi_init;
-		dev->halt = natsemi_disable;
-		dev->send = natsemi_send;
-		dev->recv = natsemi_poll;
+		dev->eo->init = natsemi_init;
+		dev->eo->halt = natsemi_disable;
+		dev->eo->send = natsemi_send;
+		dev->eo->recv = natsemi_poll;
 
 		eth_register(dev);
 
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index ef35922..2cc9743 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -789,10 +789,10 @@  int ne2k_register(void)
 	if (ne2k_setup_driver(dev))
 		return -1;
 
-	dev->init = ne2k_init;
-	dev->halt = ne2k_halt;
-	dev->send = ne2k_send;
-	dev->recv = ne2k_recv;
+	dev->eo->init = ne2k_init;
+	dev->eo->halt = ne2k_halt;
+	dev->eo->send = ne2k_send;
+	dev->eo->recv = ne2k_recv;
 
 	sprintf(dev->name, "NE2000");
 
diff --git a/drivers/net/npe/npe.c b/drivers/net/npe/npe.c
index 1fe3a95..d376c21 100644
--- a/drivers/net/npe/npe.c
+++ b/drivers/net/npe/npe.c
@@ -625,10 +625,10 @@  int npe_initialize(bd_t * bis)
 
 		sprintf(dev->name, "NPE%d", eth_num);
 		dev->priv = (void *)p_npe;
-		dev->init = npe_init;
-		dev->halt = npe_halt;
-		dev->send = npe_send;
-		dev->recv = npe_rx;
+		dev->eo->init = npe_init;
+		dev->eo->halt = npe_halt;
+		dev->eo->send = npe_send;
+		dev->eo->recv = npe_rx;
 
 		p_npe->print_speed = 1;
 
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index cfe1f34..8b08e0b 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -346,10 +346,10 @@  ns8382x_initialize(bd_t * bis)
 		sprintf(dev->name, "dp8382x#%d", card_number);
 		dev->iobase = bus_to_phys(iobase);
 		dev->priv = (void *) devno;
-		dev->init = ns8382x_init;
-		dev->halt = ns8382x_disable;
-		dev->send = ns8382x_send;
-		dev->recv = ns8382x_poll;
+		dev->eo->init = ns8382x_init;
+		dev->eo->halt = ns8382x_disable;
+		dev->eo->send = ns8382x_send;
+		dev->eo->recv = ns8382x_poll;
 
 		/* ns8382x has a non-standard PM control register
 		 * in PCI config space.  Some boards apparently need
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index c028a44..35254c3 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -218,10 +218,10 @@  int pcnet_initialize (bd_t * bis)
 		/*
 		 * Setup device structure and register the driver.
 		 */
-		dev->init = pcnet_init;
-		dev->halt = pcnet_halt;
-		dev->send = pcnet_send;
-		dev->recv = pcnet_recv;
+		dev->eo->init = pcnet_init;
+		dev->eo->halt = pcnet_halt;
+		dev->eo->send = pcnet_send;
+		dev->eo->recv = pcnet_recv;
 
 		eth_register (dev);
 	}
diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index 93782c2..d3eb692 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -110,10 +110,10 @@  int plb2800_eth_initialize(bd_t * bis)
 	memset(dev, 0, sizeof(*dev));
 
 	sprintf(dev->name, "PLB2800 Switch");
-	dev->init = plb2800_eth_init;
-	dev->halt = plb2800_eth_halt;
-	dev->send = plb2800_eth_send;
-	dev->recv = plb2800_eth_recv;
+	dev->eo->init = plb2800_eth_init;
+	dev->eo->halt = plb2800_eth_halt;
+	dev->eo->send = plb2800_eth_send;
+	dev->eo->recv = plb2800_eth_recv;
 
 	eth_register(dev);
 
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 4186699..ed02cf6 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -229,12 +229,12 @@  int rtl8139_initialize(bd_t *bis)
 
 		dev->priv = (void *) devno;
 		dev->iobase = (int)bus_to_phys(iobase);
-		dev->init = rtl8139_probe;
-		dev->halt = rtl_disable;
-		dev->send = rtl_transmit;
-		dev->recv = rtl_poll;
+		dev->eo->init = rtl8139_probe;
+		dev->eo->halt = rtl_disable;
+		dev->eo->send = rtl_transmit;
+		dev->eo->recv = rtl_poll;
 #ifdef CONFIG_MCAST_TFTP
-		dev->mcast = rtl_bcast_addr;
+		dev->eo->mcast = rtl_bcast_addr;
 #endif
 
 		eth_register (dev);
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 9864fd7..c75fd4f 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -902,10 +902,10 @@  int rtl8169_initialize(bd_t *bis)
 		dev->priv = (void *) devno;
 		dev->iobase = (int)pci_mem_to_phys(devno, iobase);
 
-		dev->init = rtl_reset;
-		dev->halt = rtl_halt;
-		dev->send = rtl_send;
-		dev->recv = rtl_recv;
+		dev->eo->init = rtl_reset;
+		dev->eo->halt = rtl_halt;
+		dev->eo->send = rtl_send;
+		dev->eo->recv = rtl_recv;
 
 		eth_register (dev);
 
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 2d9cc32..1f8d0c1 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -529,10 +529,10 @@  int sh_eth_initialize(bd_t *bd)
 
     dev->priv = (void *)eth;
     dev->iobase = 0;
-    dev->init = sh_eth_init;
-    dev->halt = sh_eth_halt;
-    dev->send = sh_eth_send;
-    dev->recv = sh_eth_recv;
+	dev->eo->init = sh_eth_init;
+	dev->eo->halt = sh_eth_halt;
+	dev->eo->send = sh_eth_send;
+	dev->eo->recv = sh_eth_recv;
     eth->port_info[eth->port].dev = dev;
 
 	sprintf(dev->name, SHETHER_NAME);
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 6dc7ad5..3ea7213 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -1357,11 +1357,11 @@  int smc91111_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[i] = SMC_inb(dev, (ADDR0_REG + i));
 	swap_to(FLASH);
 
-	dev->init = smc_init;
-	dev->halt = smc_halt;
-	dev->send = smc_send;
-	dev->recv = smc_rcv;
-	dev->write_hwaddr = smc_write_hwaddr;
+	dev->eo->init = smc_init;
+	dev->eo->halt = smc_halt;
+	dev->eo->send = smc_send;
+	dev->eo->recv = smc_rcv;
+	dev->eo->write_hwaddr = smc_write_hwaddr;
 	sprintf(dev->name, "%s-%hu", SMC_DEV_NAME, dev_num);
 
 	eth_register(dev);
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index b2aed7e..5ba1bdf 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -282,10 +282,10 @@  int smc911x_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[5] = addrh >> 8;
 	}
 
-	dev->init = smc911x_init;
-	dev->halt = smc911x_halt;
-	dev->send = smc911x_send;
-	dev->recv = smc911x_rx;
+	dev->eo->init = smc911x_init;
+	dev->eo->halt = smc911x_halt;
+	dev->eo->send = smc911x_send;
+	dev->eo->recv = smc911x_rx;
 	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
 
 	eth_register(dev);
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index f5e314b..345d563 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -638,12 +638,12 @@  static int tsec_initialize(bd_t *bis, struct tsec_info_struct *tsec_info)
 	priv->bus = miiphy_get_dev_by_name(tsec_info->mii_devname);
 	dev->iobase = 0;
 	dev->priv = priv;
-	dev->init = tsec_init;
-	dev->halt = tsec_halt;
-	dev->send = tsec_send;
-	dev->recv = tsec_recv;
+	dev->eo->init = tsec_init;
+	dev->eo->halt = tsec_halt;
+	dev->eo->send = tsec_send;
+	dev->eo->recv = tsec_recv;
 #ifdef CONFIG_MCAST_TFTP
-	dev->mcast = tsec_mcast_addr;
+	dev->eo->mcast = tsec_mcast_addr;
 #endif
 
 	/* Tell u-boot to get the addr from the env */
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index b2c1be5..bed09d5 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -739,10 +739,10 @@  int tsi108_eth_initialize (bd_t * bis)
 
 		dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
 		dev->priv = (void *)(phy_address[index]);
-		dev->init = tsi108_eth_probe;
-		dev->halt = tsi108_eth_halt;
-		dev->send = tsi108_eth_send;
-		dev->recv = tsi108_eth_recv;
+		dev->eo->init = tsi108_eth_probe;
+		dev->eo->halt = tsi108_eth_halt;
+		dev->eo->send = tsi108_eth_send;
+		dev->eo->recv = tsi108_eth_recv;
 
 		eth_register(dev);
 	}
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 9648901..33d8b49 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -237,10 +237,10 @@  int uli526x_initialize(bd_t *bis)
 		db->pdev = devno;
 		dev->iobase = iobase;
 
-		dev->init = uli526x_init_one;
-		dev->halt = uli526x_disable;
-		dev->send = uli526x_start_xmit;
-		dev->recv = uli526x_rx_packet;
+		dev->eo->init = uli526x_init_one;
+		dev->eo->halt = uli526x_disable;
+		dev->eo->send = uli526x_start_xmit;
+		dev->eo->recv = uli526x_rx_packet;
 
 		/* init db */
 		db->ioaddr = dev->iobase;
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index d777144..54a871b 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -645,11 +645,11 @@  int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr,
 	priv->dmatx = (struct axidma_reg *)dma_addr;
 	/* RX channel offset is 0x30 */
 	priv->dmarx = (struct axidma_reg *)(dma_addr + 0x30);
-	dev->init = axiemac_init;
-	dev->halt = axiemac_halt;
-	dev->send = axiemac_send;
-	dev->recv = axiemac_recv;
-	dev->write_hwaddr = axiemac_setup_mac;
+	dev->eo->init = axiemac_init;
+	dev->eo->halt = axiemac_halt;
+	dev->eo->send = axiemac_send;
+	dev->eo->recv = axiemac_recv;
+	dev->eo->write_hwaddr = axiemac_setup_mac;
 
 #ifdef CONFIG_PHY_ADDR
 	priv->phyaddr = CONFIG_PHY_ADDR;
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index d890d60..c0fefa7 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -369,10 +369,10 @@  int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
 	sprintf(dev->name, "Xelite.%lx", base_addr);
 
 	dev->iobase = base_addr;
-	dev->init = emaclite_init;
-	dev->halt = emaclite_halt;
-	dev->send = emaclite_send;
-	dev->recv = emaclite_recv;
+	dev->eo->init = emaclite_init;
+	dev->eo->halt = emaclite_halt;
+	dev->eo->send = emaclite_send;
+	dev->eo->recv = emaclite_recv;
 
 	eth_register(dev);
 
diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
index b67153b..8f67417 100644
--- a/drivers/net/xilinx_ll_temac.c
+++ b/drivers/net/xilinx_ll_temac.c
@@ -313,9 +313,9 @@  int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 	dev->iobase = devinf->base_addr;
 
 	dev->priv = ll_temac;
-	dev->init = ll_temac_init;
-	dev->halt = ll_temac_halt;
-	dev->write_hwaddr = ll_temac_setup_mac_addr;
+	dev->eo->init = ll_temac_init;
+	dev->eo->halt = ll_temac_halt;
+	dev->eo->write_hwaddr = ll_temac_setup_mac_addr;
 
 	ll_temac->ctrladdr = devinf->ctrl_addr;
 	if (devinf->flags & XILINX_LL_TEMAC_M_SDMA_PLB) {
@@ -334,16 +334,16 @@  int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 		ll_temac->ctrlinit = ll_temac_init_sdma;
 		ll_temac->ctrlhalt = ll_temac_halt_sdma;
 		ll_temac->ctrlreset = ll_temac_reset_sdma;
-		dev->recv = ll_temac_recv_sdma;
-		dev->send = ll_temac_send_sdma;
+		dev->eo->recv = ll_temac_recv_sdma;
+		dev->eo->send = ll_temac_send_sdma;
 	} else {
 		ll_temac->in32 = NULL;
 		ll_temac->out32 = NULL;
 		ll_temac->ctrlinit = NULL;
 		ll_temac->ctrlhalt = NULL;
 		ll_temac->ctrlreset = ll_temac_reset_fifo;
-		dev->recv = ll_temac_recv_fifo;
-		dev->send = ll_temac_send_fifo;
+		dev->eo->recv = ll_temac_recv_fifo;
+		dev->eo->send = ll_temac_send_fifo;
 	}
 
 	/* Link to specified MDIO bus */
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 3596065..3cba176 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -425,11 +425,11 @@  int zynq_gem_initialize(bd_t *bis, int base_addr)
 
 	dev->iobase = base_addr;
 
-	dev->init = zynq_gem_init;
-	dev->halt = zynq_gem_halt;
-	dev->send = zynq_gem_send;
-	dev->recv = zynq_gem_recv;
-	dev->write_hwaddr = zynq_gem_setup_mac;
+	dev->eo->init = zynq_gem_init;
+	dev->eo->halt = zynq_gem_halt;
+	dev->eo->send = zynq_gem_send;
+	dev->eo->recv = zynq_gem_recv;
+	dev->eo->write_hwaddr = zynq_gem_setup_mac;
 
 	eth_register(dev);
 
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index e6ae709..0aded61 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -1394,10 +1394,10 @@  int uec_initialize(bd_t *bis, uec_info_t *uec_info)
 	sprintf(dev->name, "UEC%d", uec_info->uf_info.ucc_num);
 	dev->iobase = 0;
 	dev->priv = (void *)uec;
-	dev->init = uec_init;
-	dev->halt = uec_halt;
-	dev->send = uec_send;
-	dev->recv = uec_recv;
+	dev->eo->init = uec_init;
+	dev->eo->halt = uec_halt;
+	dev->eo->send = uec_send;
+	dev->eo->recv = uec_recv;
 
 	/* Clear the ethnet address */
 	for (i = 0; i < 6; i++)
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 75ec8f7..f2cea6b 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -702,12 +702,12 @@  int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 		return 0;
 	}
 	sprintf(eth->name, "%s%d", ASIX_BASE_NAME, curr_eth_dev++);
-	eth->init = asix_init;
-	eth->send = asix_send;
-	eth->recv = asix_recv;
-	eth->halt = asix_halt;
+	eth->eo->init = asix_init;
+	eth->eo->send = asix_send;
+	eth->eo->recv = asix_recv;
+	eth->eo->halt = asix_halt;
 	if (!(priv->flags & FLAG_TYPE_AX88172))
-		eth->write_hwaddr = asix_write_hwaddr;
+		eth->eo->write_hwaddr = asix_write_hwaddr;
 	eth->priv = ss;
 
 	if (asix_basic_reset(ss))
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index dc5ca65..b8c2f2e 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -890,11 +890,11 @@  int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 		return 0;
 	}
 	sprintf(eth->name, "%s%d", SMSC95XX_BASE_NAME, curr_eth_dev++);
-	eth->init = smsc95xx_init;
-	eth->send = smsc95xx_send;
-	eth->recv = smsc95xx_recv;
-	eth->halt = smsc95xx_halt;
-	eth->write_hwaddr = smsc95xx_write_hwaddr;
+	eth->eo->init = smsc95xx_init;
+	eth->eo->send = smsc95xx_send;
+	eth->eo->recv = smsc95xx_recv;
+	eth->eo->halt = smsc95xx_halt;
+	eth->eo->write_hwaddr = smsc95xx_write_hwaddr;
 	eth->priv = ss;
 	return 1;
 }
diff --git a/include/net.h b/include/net.h
index 3539336..939ad7f 100644
--- a/include/net.h
+++ b/include/net.h
@@ -78,12 +78,9 @@  enum eth_state_t {
 	ETH_STATE_ACTIVE
 };
 
-struct eth_device {
-	char name[16];
-	unsigned char enetaddr[6];
-	int iobase;
-	int state;
+struct eth_device;
 
+struct eth_ops {
 	int  (*init) (struct eth_device *, bd_t *);
 	int  (*send) (struct eth_device *, void *packet, int length);
 	int  (*recv) (struct eth_device *);
@@ -91,7 +88,15 @@  struct eth_device {
 #ifdef CONFIG_MCAST_TFTP
 	int (*mcast) (struct eth_device *, u32 ip, u8 set);
 #endif
-	int  (*write_hwaddr) (struct eth_device *);
+	int (*write_hwaddr) (struct eth_device *);
+};
+
+struct eth_device {
+	char name[16];
+	unsigned char enetaddr[6];
+	int iobase;
+	int state;
+	struct eth_ops *eo;
 	struct eth_device *next;
 	int index;
 	void *priv;
diff --git a/net/eth.c b/net/eth.c
index 321d5b1..1bd1ce6 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -217,12 +217,12 @@  int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
 			dev->name);
 	}
 
-	if (dev->write_hwaddr &&
+	if (dev->eo->write_hwaddr &&
 			!eth_mac_skip(eth_number)) {
 		if (!is_valid_ether_addr(dev->enetaddr))
 			return -1;
 
-		ret = dev->write_hwaddr(dev);
+		ret = dev->eo->write_hwaddr(dev);
 	}
 
 	return ret;
@@ -363,7 +363,7 @@  int eth_initialize(bd_t *bis)
 int eth_mcast_join(IPaddr_t mcast_ip, u8 join)
 {
 	u8 mcast_mac[6];
-	if (!eth_current || !eth_current->mcast)
+	if (!eth_current || !eth_current->eo->mcast)
 		return -1;
 	mcast_mac[5] = htonl(mcast_ip) & 0xff;
 	mcast_mac[4] = (htonl(mcast_ip)>>8) & 0xff;
@@ -371,7 +371,7 @@  int eth_mcast_join(IPaddr_t mcast_ip, u8 join)
 	mcast_mac[2] = 0x5e;
 	mcast_mac[1] = 0x0;
 	mcast_mac[0] = 0x1;
-	return eth_current->mcast(eth_current, mcast_mac, join);
+	return eth_current->eo->mcast(eth_current, mcast_mac, join);
 }
 
 /* the 'way' for ethernet-CRC-32. Spliced in from Linux lib/crc32.c
@@ -426,7 +426,7 @@  int eth_init(bd_t *bis)
 	do {
 		debug("Trying %s\n", eth_current->name);
 
-		if (eth_current->init(eth_current, bis) >= 0) {
+		if (eth_current->eo->init(eth_current, bis) >= 0) {
 			eth_current->state = ETH_STATE_ACTIVE;
 
 			return 0;
@@ -444,7 +444,7 @@  void eth_halt(void)
 	if (!eth_current)
 		return;
 
-	eth_current->halt(eth_current);
+	eth_current->eo->halt(eth_current);
 
 	eth_current->state = ETH_STATE_PASSIVE;
 }
@@ -454,7 +454,7 @@  int eth_send(void *packet, int length)
 	if (!eth_current)
 		return -1;
 
-	return eth_current->send(eth_current, packet, length);
+	return eth_current->eo->send(eth_current, packet, length);
 }
 
 int eth_rx(void)
@@ -462,7 +462,7 @@  int eth_rx(void)
 	if (!eth_current)
 		return -1;
 
-	return eth_current->recv(eth_current);
+	return eth_current->eo->recv(eth_current);
 }
 
 #ifdef CONFIG_API