All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
@ 2012-11-02 17:17 Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 01/50] net: Pull out ops from struct eth_device Tomas Hlavacek
                   ` (52 more replies)
  0 siblings, 53 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

This patchset is a first stage of preparation of the net subsystem
for the driver model.

The idea of this patchset is:
1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
   Add a sparate structure eth_ops which is ready for inclusion
   to DM core.
2) Replace dynamic init of ops function pointers by static struct.
3) Do minor style cleanup.

Tomas Hlavacek (50):
  net: dm: Pull out ops from struct eth_device
  net: 4xx_enet: Pull out init of struct eth_ops
  net: altera_tse: Pull out init of struct eth_ops
  net: dm9000x: Pull out init of struct eth_ops
  net: armada100_fec: Pull out init of struct eth_ops
  net: at91_emac: Pull out init of struct eth_ops
  net: ax88180: Pull out init of struct eth_ops
  net: bfin_mac: Pull out init of struct eth_ops
  net: calxedaxgmac: Pull out init of struct eth_ops
  net: cpsw: Pull out init of struct eth_ops
  net: cs8900: Pull out init of struct eth_ops
  net: davinci_emac: Pull out init of struct eth_ops
  net: dc2114x: Pull out init of struct eth_ops
  net: designware: Pull out init of struct eth_ops
  net: dnet: Pull out init of struct eth_ops
  net: e1000: Pull out init of struct eth_ops
  net: eepro100: Pull out init of struct eth_ops
  net: enc28j60: Pull out init of struct eth_ops
  net: ep93xx_eth: Pull out init of struct eth_ops
  net: ethoc: Pull out init of struct eth_ops
  net: fec_mxc: Pull out init of struct eth_ops
  net: ftgmac100: Pull out init of struct eth_ops
  net: greth.c: Pull out init of struct eth_ops
  net: fsl_mcdmafec: Pull out init of struct eth_ops
  net: inca-ip_sw: Pull out init of struct eth_ops
  net: ks8695eth: Pull out init of struct eth_ops
  net: lan91c96: Pull out init of struct eth_ops
  net: macb: Pull out init of struct eth_ops
  net: mcffec: Pull out init of struct eth_ops
  net: mpc5xxx_fec: Pull out init of struct eth_ops
  net: mvgbe: Pull out init of struct eth_ops
  net: mpc512x_fec: Pull out init of struct eth_ops
  net: natsemi: Pull out init of struct eth_ops
  net: ne2000: Pull out init of struct eth_ops
  net: npe: Pull out init of struct eth_ops
  net: ns8382x: Pull out init of struct eth_ops
  net: pcnet: Pull out init of struct eth_ops
  net: plb2800_eth: Pull out init of struct eth_ops
  net: rtl8139: Pull out init of struct eth_ops
  net: rtl8169: Pull out init of struct eth_ops
  net: smc91111: Pull out init of struct eth_ops
  net: smc911x: Pull out init of struct eth_ops
  net: tsec: Pull out init of struct eth_ops
  net: tsi108_eth: Pull out init of struct eth_ops
  net: uli526x: Pull out init of struct eth_ops
  net: xilinx_axi_emac: Pull out init of struct eth_ops
  net: xilinx_emaclite: Pull out init of struct eth_ops
  net: zynq_gem: Pull out init of struct eth_ops
  net: xilinx_ll_temac: Pull out init of struct eth_ops
  net: sh_eth: Pull out init of struct eth_ops

 board/davinci/da8xxevm/da830evm.c |    2 +-
 drivers/net/4xx_enet.c            |   12 ++++++++----
 drivers/net/altera_tse.c          |   14 +++++++++-----
 drivers/net/armada100_fec.c       |   12 ++++++++----
 drivers/net/at91_emac.c           |   14 +++++++++-----
 drivers/net/ax88180.c             |   13 +++++++++----
 drivers/net/bfin_mac.c            |   14 +++++++++-----
 drivers/net/calxedaxgmac.c        |   14 ++++++++++----
 drivers/net/cpsw.c                |   12 ++++++++----
 drivers/net/cs8900.c              |   12 ++++++++----
 drivers/net/davinci_emac.c        |   14 +++++++++-----
 drivers/net/dc2114x.c             |   14 +++++++++-----
 drivers/net/designware.c          |   14 +++++++++-----
 drivers/net/dm9000x.c             |   12 ++++++++----
 drivers/net/dnet.c                |   14 +++++++++-----
 drivers/net/e1000.c               |   12 ++++++++----
 drivers/net/eepro100.c            |   12 ++++++++----
 drivers/net/enc28j60.c            |   14 +++++++++-----
 drivers/net/ep93xx_eth.c          |   12 ++++++++----
 drivers/net/ethoc.c               |   14 +++++++++-----
 drivers/net/fec_mxc.c             |   15 ++++++++++-----
 drivers/net/fm/eth.c              |    8 ++++----
 drivers/net/fsl_mcdmafec.c        |   12 ++++++++----
 drivers/net/ftgmac100.c           |   12 ++++++++----
 drivers/net/ftmac100.c            |    8 ++++----
 drivers/net/greth.c               |   12 ++++++++----
 drivers/net/inca-ip_sw.c          |   11 +++++++----
 drivers/net/ks8695eth.c           |   12 ++++++++----
 drivers/net/lan91c96.c            |   12 ++++++++----
 drivers/net/macb.c                |   14 +++++++++-----
 drivers/net/mcffec.c              |   12 ++++++++----
 drivers/net/mpc512x_fec.c         |   12 ++++++++----
 drivers/net/mpc5xxx_fec.c         |   11 +++++++----
 drivers/net/mvgbe.c               |   14 +++++++++-----
 drivers/net/natsemi.c             |   12 ++++++++----
 drivers/net/ne2000_base.c         |   12 ++++++++----
 drivers/net/npe/npe.c             |   12 ++++++++----
 drivers/net/ns8382x.c             |   13 +++++++++----
 drivers/net/pcnet.c               |   13 ++++++++-----
 drivers/net/plb2800_eth.c         |   11 +++++++----
 drivers/net/rtl8139.c             |   18 +++++++++++-------
 drivers/net/rtl8169.c             |   13 +++++++++----
 drivers/net/sh_eth.c              |   12 ++++++++----
 drivers/net/smc91111.c            |   14 +++++++++-----
 drivers/net/smc911x.c             |   12 ++++++++----
 drivers/net/tsec.c                |   18 +++++++++++-------
 drivers/net/tsi108_eth.c          |   12 ++++++++----
 drivers/net/uli526x.c             |   12 ++++++++----
 drivers/net/xilinx_axi_emac.c     |   15 ++++++++++-----
 drivers/net/xilinx_emaclite.c     |   12 ++++++++----
 drivers/net/xilinx_ll_temac.c     |   27 ++++++++++++++++++++-------
 drivers/net/zynq_gem.c            |   14 +++++++++-----
 drivers/usb/eth/asix.c            |   10 +++++-----
 drivers/usb/eth/smsc95xx.c        |   10 +++++-----
 include/net.h                     |   17 +++++++++++------
 net/eth.c                         |   16 ++++++++--------
 56 files changed, 467 insertions(+), 254 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 01/50] net: Pull out ops from struct eth_device
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 02/50] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
                   ` (51 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

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>
---
 board/davinci/da8xxevm/da830evm.c |    2 +-
 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                |   10 +++++-----
 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/usb/eth/asix.c            |   10 +++++-----
 drivers/usb/eth/smsc95xx.c        |   10 +++++-----
 include/net.h                     |   17 +++++++++++------
 net/eth.c                         |   16 ++++++++--------
 56 files changed, 254 insertions(+), 249 deletions(-)

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/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..0a88bc0 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -974,11 +974,11 @@ 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->priv	= priv;
+	dev->eo->init	= cpsw_init;
+	dev->eo->halt	= cpsw_halt;
+	dev->eo->send	= cpsw_send;
+	dev->eo->recv	= cpsw_recv;
+	dev->eo->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/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
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 02/50] net: 4xx_enet: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 01/50] net: Pull out ops from struct eth_device Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 03/50] net: altera_tse: " Tomas Hlavacek
                   ` (50 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/4xx_enet.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 27b66dd..309e616 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1905,6 +1905,13 @@ static int ppc_4xx_eth_rx (struct eth_device *dev)
 	return length;
 }
 
+static struct eth_ops ppc_4xx_eth_ops = {
+	.init = ppc_4xx_eth_init,
+	.send = ppc_4xx_eth_send,
+	.recv = ppc_4xx_eth_rx,
+	.halt = ppc_4xx_eth_halt
+};
+
 int ppc_4xx_eth_initialize (bd_t * bis)
 {
 	static int virgin = 0;
@@ -2023,10 +2030,7 @@ 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->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;
+		dev->eo = &ppc_4xx_eth_ops;
 
 		eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 03/50] net: altera_tse: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 01/50] net: Pull out ops from struct eth_device Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 02/50] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 04/50] net: dm9000x: " Tomas Hlavacek
                   ` (49 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers	statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/altera_tse.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index ee1a1f6..89cd23e 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -890,6 +890,14 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd)
 	return priv->link ? 0 : -1;
 }
 
+static struct eth_ops altera_tse_ops = {
+	.init = tse_eth_init,
+	.halt = tse_eth_halt,
+	.send = tse_eth_send,
+	.recv = tse_eth_rx,
+	.write_hwaddr = tse_set_mac_address
+};
+
 /* TSE init code */
 int altera_tse_initialize(u8 dev_num, int mac_base,
 			  int sgdma_rx_base, int sgdma_tx_base,
@@ -951,11 +959,7 @@ int altera_tse_initialize(u8 dev_num, int mac_base,
 
 	/* init eth structure */
 	dev->priv = priv;
-	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;
+	dev->eo = &altera_tse_ops;
 	sprintf(dev->name, "%s-%hu", "ALTERA_TSE", dev_num);
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 04/50] net: dm9000x: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (2 preceding siblings ...)
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 03/50] net: altera_tse: " Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 05/50] net: armada100_fec: " Tomas Hlavacek
                   ` (48 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dm9000x.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index bd96948..f6b226c 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -623,6 +623,13 @@ dm9000_phy_write(int reg, u16 value)
 	DM9000_DBG("dm9000_phy_write(reg:0x%x, value:0x%x)\n", reg, value);
 }
 
+static struct eth_ops dm9000_ops = {
+	.init = dm9000_init,
+	.send = dm9000_send,
+	.recv = dm9000_rx,
+	.halt = dm9000_halt
+};
+
 int dm9000_initialize(bd_t *bis)
 {
 	struct eth_device *dev = &(dm9000_info.netdev);
@@ -630,10 +637,7 @@ int dm9000_initialize(bd_t *bis)
 	/* Load MAC address from EEPROM */
 	dm9000_get_enetaddr(dev);
 
-	dev->eo->init = dm9000_init;
-	dev->eo->halt = dm9000_halt;
-	dev->eo->send = dm9000_send;
-	dev->eo->recv = dm9000_rx;
+	dev->eo = &dm9000_ops;
 	sprintf(dev->name, "dm9000");
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 05/50] net: armada100_fec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (3 preceding siblings ...)
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 04/50] net: dm9000x: " Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 06/50] net: at91_emac: " Tomas Hlavacek
                   ` (47 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/armada100_fec.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index f256381..d826e11 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -678,6 +678,13 @@ static int armdfec_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops armada100_fec_ops = {
+	.init = armdfec_init,
+	.halt = armdfec_halt,
+	.send = armdfec_send,
+	.recv = armdfec_recv
+};
+
 int armada100_fec_register(unsigned long base_addr)
 {
 	struct armdfec_device *darmdfec;
@@ -718,10 +725,7 @@ int armada100_fec_register(unsigned long base_addr)
 	/* must be less than sizeof(dev->name) */
 	strcpy(dev->name, "armd-fec0");
 
-	dev->eo->init = armdfec_init;
-	dev->eo->halt = armdfec_halt;
-	dev->eo->send = armdfec_send;
-	dev->eo->recv = armdfec_recv;
+	dev->eo = &armada100_fec_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 06/50] net: at91_emac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (4 preceding siblings ...)
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 05/50] net: armada100_fec: " Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 07/50] net: ax88180: " Tomas Hlavacek
                   ` (46 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/at91_emac.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 3395dcc..464d539 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -494,6 +494,14 @@ static int at91emac_write_hwaddr(struct eth_device *netdev)
 	return 0;
 }
 
+static struct eth_ops at91emac_ops = {
+	.init = at91emac_init,
+	.halt = at91emac_halt,
+	.send = at91emac_send,
+	.recv = at91emac_recv,
+	.write_hwaddr = at91emac_write_hwaddr
+};
+
 int at91emac_register(bd_t *bis, unsigned long iobase)
 {
 	emac_device *emac;
@@ -518,11 +526,7 @@ int at91emac_register(bd_t *bis, unsigned long iobase)
 	sprintf(dev->name, "emac");
 	dev->iobase = iobase;
 	dev->priv = emacfix;
-	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;
+	dev->eo = &at91emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 07/50] net: ax88180: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (5 preceding siblings ...)
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 06/50] net: at91_emac: " Tomas Hlavacek
@ 2012-11-02 17:17 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 08/50] net: bfin_mac: " Tomas Hlavacek
                   ` (45 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:17 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ax88180.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index 464f261..fc237ba 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -698,6 +698,14 @@ static void ax88180_read_mac_addr (struct eth_device *dev)
 	}
 }
 
+static struct eth_ops ax88180_ops = {
+	.init = ax88180_init,
+	.halt = ax88180_halt,
+	.send = ax88180_send,
+	.recv = ax88180_recv
+};
+
+
 /*
 ===========================================================================
 <<<<<<			Exported SubProgram Bodies		>>>>>>
@@ -725,10 +733,7 @@ int ax88180_initialize (bd_t * bis)
 	sprintf (dev->name, "ax88180");
 	dev->iobase = AX88180_BASE;
 	dev->priv = priv;
-	dev->eo->init = ax88180_init;
-	dev->eo->halt = ax88180_halt;
-	dev->eo->send = ax88180_send;
-	dev->eo->recv = ax88180_recv;
+	dev->eo = &ax88180_ops;
 
 	priv->BusWidth = BUS_WIDTH_32;
 	priv->PadSize = 3;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 08/50] net: bfin_mac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (6 preceding siblings ...)
  2012-11-02 17:17 ` [U-Boot] [RFC PATCH 07/50] net: ax88180: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 09/50] net: calxedaxgmac: " Tomas Hlavacek
                   ` (44 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/bfin_mac.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index ef4736f..b2c4b0f 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -91,6 +91,14 @@ static int bfin_miiphy_write(const char *devname, uchar addr, uchar reg, ushort
 	return 0;
 }
 
+static struct eth_ops bfin_emac_ops = {
+	.init = bfin_EMAC_init,
+	.halt = bfin_EMAC_halt,
+	.send = bfin_EMAC_send,
+	.recv = bfin_EMAC_recv,
+	.write_hwaddr = bfin_EMAC_setup_addr
+};
+
 int bfin_EMAC_initialize(bd_t *bis)
 {
 	struct eth_device *dev;
@@ -103,11 +111,7 @@ int bfin_EMAC_initialize(bd_t *bis)
 
 	dev->iobase = 0;
 	dev->priv = 0;
-	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;
+	dev->eo = &bfin_emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 09/50] net: calxedaxgmac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (7 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 08/50] net: bfin_mac: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 10/50] net: cpsw: " Tomas Hlavacek
                   ` (43 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/calxedaxgmac.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 2346feb..3550160 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -508,6 +508,15 @@ static void xgmac_halt(struct eth_device *dev)
 	priv->rx_currdesc = 0;
 }
 
+static struct eth_ops xgmac_ops = {
+	.init = xgmac_init,
+	.send = xgmac_tx,
+	.recv = xgmac_rx,
+	.halt = xgmac_halt
+};
+
+
+
 int calxedaxgmac_initialize(u32 id, ulong base_addr)
 {
 	struct eth_device *dev;
@@ -543,10 +552,7 @@ int calxedaxgmac_initialize(u32 id, ulong base_addr)
 	macaddr[0] = readl(&regs->macaddr[0].lo);
 	memcpy(dev->enetaddr, macaddr, 6);
 
-	dev->eo->init = xgmac_init;
-	dev->eo->send = xgmac_tx;
-	dev->eo->recv = xgmac_rx;
-	dev->eo->halt = xgmac_halt;
+	dev->eo = &xgmac_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 10/50] net: cpsw: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (8 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 09/50] net: calxedaxgmac: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 11/50] net: cs8900: " Tomas Hlavacek
                   ` (42 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/cpsw.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 0a88bc0..8992b66 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -931,6 +931,13 @@ static int cpsw_phy_init(struct eth_device *dev, struct cpsw_slave *slave)
 	return 1;
 }
 
+static struct eth_ops cpsw_ops = {
+	.init = cpsw_init,
+	.halt = cpsw_halt,
+	.send = cpsw_send,
+	.recv = cpsw_recv
+};
+
 int cpsw_register(struct cpsw_platform_data *data)
 {
 	struct cpsw_priv	*priv;
@@ -974,11 +981,8 @@ int cpsw_register(struct cpsw_platform_data *data)
 
 	strcpy(dev->name, "cpsw");
 	dev->iobase	= 0;
-	dev->eo->init	= cpsw_init;
-	dev->eo->halt	= cpsw_halt;
-	dev->eo->send	= cpsw_send;
-	dev->eo->recv	= cpsw_recv;
-	dev->eo->priv	= priv;
+	dev->eo		= &cpsw_ops;
+	dev->priv	= priv;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 11/50] net: cs8900: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (9 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 10/50] net: cpsw: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 12/50] net: davinci_emac: " Tomas Hlavacek
                   ` (41 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/cs8900.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 65a4254..a78eada 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -299,6 +299,13 @@ int cs8900_e2prom_write(struct eth_device *dev, u8 addr, u16 value)
 	return 0;
 }
 
+static struct eth_ops cs8900_ops = {
+	.init = cs8900_init,
+	.halt = cs8900_halt,
+	.send = cs8900_send,
+	.recv = cs8900_recv
+};
+
 int cs8900_initialize(u8 dev_num, int base_addr)
 {
 	struct eth_device *dev;
@@ -320,10 +327,7 @@ int cs8900_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	dev->eo->init = cs8900_init;
-	dev->eo->halt = cs8900_halt;
-	dev->eo->send = cs8900_send;
-	dev->eo->recv = cs8900_recv;
+	dev->eo = &cs8900_ops;
 
 	/* Load MAC address from EEPROM */
 	cs8900_get_enetaddr(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 12/50] net: davinci_emac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (10 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 11/50] net: cs8900: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 13/50] net: dc2114x: " Tomas Hlavacek
                   ` (40 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/davinci_emac.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index a221092..5701f75 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -769,6 +769,14 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
 	return (0);
 }
 
+static struct eth_ops davinci_emac_ops = {
+	.init = davinci_eth_open,
+	.halt = davinci_eth_close,
+	.send = davinci_eth_send_packet,
+	.recv = davinci_eth_rcv_packet,
+	.write_hwaddr = davinci_eth_set_mac_addr
+};
+
 /*
  * This function initializes the emac hardware. It does NOT initialize
  * EMAC modules power or pin multiplexors, that is done by board_init()
@@ -791,11 +799,7 @@ int davinci_emac_initialize(void)
 	sprintf(dev->name, "DaVinci-EMAC");
 
 	dev->iobase = 0;
-	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;
+	dev->eo = &davinci_emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 13/50] net: dc2114x: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (11 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 12/50] net: davinci_emac: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 14/50] net: designware: " Tomas Hlavacek
                   ` (39 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dc2114x.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 0361699..afdc088 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -207,6 +207,13 @@ static struct pci_device_id supported[] = {
 	{ }
 };
 
+static struct eth_ops dc21x4x_ops = {
+	.init = dc21x4x_init,
+	.halt = dc21x4x_halt,
+	.send = dc21x4x_send,
+	.recv = dc21x4x_recv
+};
+
 int dc21x4x_initialize(bd_t *bis)
 {
 	int			idx=0;
@@ -299,11 +306,8 @@ int dc21x4x_initialize(bd_t *bis)
 #else
 		dev->iobase = pci_mem_to_phys(devbusfn, iobase);
 #endif
-		dev->priv   = (void*) devbusfn;
-		dev->eo->init   = dc21x4x_init;
-		dev->eo->halt   = dc21x4x_halt;
-		dev->eo->send   = dc21x4x_send;
-		dev->eo->recv   = dc21x4x_recv;
+		dev->priv = (void *) devbusfn;
+		dev->eo = &dc21x4x_ops;
 
 		/* Ensure we're not sleeping. */
 		pci_write_config_byte(devbusfn, PCI_CFDA_PSM, WAKEUP);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 14/50] net: designware: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (12 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 13/50] net: dc2114x: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 15/50] net: dnet: " Tomas Hlavacek
                   ` (38 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/designware.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 2d92591..255819e 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -523,6 +523,14 @@ static int dw_mii_write(const char *devname, u8 addr, u8 reg, u16 val)
 }
 #endif
 
+static struct eth_ops dw_eth_ops = {
+	.init = dw_eth_init,
+	.send = dw_eth_send,
+	.recv = dw_eth_recv,
+	.halt = dw_eth_halt,
+	.write_hwaddr = dw_write_hwaddr
+};
+
 int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
 {
 	struct eth_device *dev;
@@ -559,11 +567,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
 	priv->phy_configured = 0;
 	priv->interface = interface;
 
-	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;
+	dev->eo = &dw_eth_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 15/50] net: dnet: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (13 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 14/50] net: designware: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 16/50] net: e1000: " Tomas Hlavacek
                   ` (37 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dnet.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index be0891f..126828e 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -355,6 +355,13 @@ static void dnet_halt(struct eth_device *netdev)
 	dnet_writew_mac(dnet, DNET_INTERNAL_MODE_REG, 0);
 }
 
+static struct eth_ops dnet_ops = {
+	.init = dnet_init,
+	.halt = dnet_halt,
+	.send = dnet_send,
+	.recv = dnet_recv
+};
+
 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
 {
 	struct dnet_device *dnet;
@@ -374,10 +381,7 @@ int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	dnet->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "dnet%d", id);
-	netdev->eo->init = dnet_init;
-	netdev->eo->halt = dnet_halt;
-	netdev->eo->send = dnet_send;
-	netdev->eo->recv = dnet_recv;
+	netdev->eo = &dnet_ops;
 
 	dev_capa = readl(&dnet->regs->VERCAPS) & 0xFFFF;
 	debug("%s: has %smdio, %sirq, %sgigabit, %sdma\n", netdev->name,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 16/50] net: e1000: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (14 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 15/50] net: dnet: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 17/50] net: eepro100: " Tomas Hlavacek
                   ` (36 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/e1000.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index c9f9fb3..82e89d8 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -5118,6 +5118,13 @@ void e1000_get_bus_type(struct e1000_hw *hw)
 /* A list of all registered e1000 devices */
 static LIST_HEAD(e1000_hw_list);
 
+static struct eth_ops e1000_ops = {
+	.init = e1000_init,
+	.recv = e1000_poll,
+	.send = e1000_transmit,
+	.halt = e1000_disable
+};
+
 /**************************************************************************
 PROBE - Look for an adapter, this routine's visible to the outside
 You should omit the last argument struct pci_device * for a non-PCI NIC
@@ -5218,10 +5225,7 @@ e1000_initialize(bd_t * bis)
 		       nic->enetaddr[3], nic->enetaddr[4], nic->enetaddr[5]);
 
 		/* Set up the function pointers and register the device */
-		nic->eo->init = e1000_init;
-		nic->eo->recv = e1000_poll;
-		nic->eo->send = e1000_transmit;
-		nic->eo->halt = e1000_disable;
+		nic->eo = &e1000_ops;
 		eth_register(nic);
 	}
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 17/50] net: eepro100: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (15 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 16/50] net: e1000: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 18/50] net: enc28j60: " Tomas Hlavacek
                   ` (35 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/eepro100.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index e3aa720..91d7f0b 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -408,6 +408,13 @@ static struct pci_device_id supported[] = {
 	{}
 };
 
+static struct eth_ops eepro100_ops = {
+	.init = eepro100_init,
+	.halt = eepro100_halt,
+	.send = eepro100_send,
+	.recv = eepro100_recv
+};
+
 int eepro100_initialize (bd_t * bis)
 {
 	pci_dev_t devno;
@@ -458,10 +465,7 @@ 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->eo->init = eepro100_init;
-		dev->eo->halt = eepro100_halt;
-		dev->eo->send = eepro100_send;
-		dev->eo->recv = eepro100_recv;
+		dev->eo = &eepro100_ops;
 
 		eth_register (dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 18/50] net: enc28j60: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (16 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 17/50] net: eepro100: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 19/50] net: ep93xx_eth: " Tomas Hlavacek
                   ` (34 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/enc28j60.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index 95f0b93..e73fef8 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -924,6 +924,14 @@ static void enc_halt(struct eth_device *dev)
 	enc_release_bus(enc);
 }
 
+static struct eth_ops enc28j60_ops = {
+	init = enc_init,
+	halt = enc_halt,
+	send = enc_send,
+	recv = enc_recv,
+	write_hwaddr = enc_write_hwaddr
+};
+
 /*
  * This is the only exported function.
  *
@@ -962,11 +970,7 @@ int enc28j60_initialize(unsigned int bus, unsigned int cs,
 	enc->dev = dev;
 	/* now fill the eth_device object */
 	dev->priv = enc;
-	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;
+	dev->eo = &enc28j60_ops;
 	sprintf(dev->name, "enc%i.%i", bus, cs);
 	eth_register(dev);
 #if defined(CONFIG_CMD_MII)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 19/50] net: ep93xx_eth: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (17 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 18/50] net: enc28j60: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 20/50] net: ethoc: " Tomas Hlavacek
                   ` (33 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ep93xx_eth.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 0b5cb3c..a2a1502 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -439,6 +439,13 @@ int ep93xx_miiphy_initialize(bd_t * const bd)
 }
 #endif
 
+static struct eth_dev ep93xx_eth_ops = {
+	.init = ep93xx_eth_open,
+	.halt = ep93xx_eth_close,
+	.send = ep93xx_eth_send_packet,
+	.recv = ep93xx_eth_rcv_packet
+};
+
 /**
  * Initialize the EP93xx MAC.  The MAC hardware is reset.  Buffers are
  * allocated, if necessary, for the TX and RX descriptor and status queues,
@@ -499,10 +506,7 @@ int ep93xx_eth_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	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;
+	dev->eo = &ep93xx_eth_ops;
 
 	sprintf(dev->name, "ep93xx_eth-%hu", dev_num);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 20/50] net: ethoc: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (18 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 19/50] net: ep93xx_eth: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 21/50] net: fec_mxc: " Tomas Hlavacek
                   ` (32 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ethoc.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 946b8e2..6a78605 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -482,6 +482,14 @@ static int ethoc_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops ethoc_ops = {
+	.init = ethoc_init,
+	.halt = ethoc_halt,
+	.send = ethoc_send,
+	.recv = ethoc_recv,
+	.write_hwaddr = ethoc_set_mac_address
+};
+
 int ethoc_initialize(u8 dev_num, int base_addr)
 {
 	struct ethoc *priv;
@@ -499,11 +507,7 @@ int ethoc_initialize(u8 dev_num, int base_addr)
 	memset(dev, 0, sizeof(*dev));
 	dev->priv = priv;
 	dev->iobase = base_addr;
-	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;
+	dev->eo = &ethoc_ops;
 	sprintf(dev->name, "%s-%hu", "ETHOC", dev_num);
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 21/50] net: fec_mxc: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (19 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 20/50] net: ethoc: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 22/50] net: ftgmac100: " Tomas Hlavacek
                   ` (31 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/fec_mxc.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index f8a5556..3259f07 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -915,6 +915,15 @@ static int fec_recv(struct eth_device *dev)
 	return len;
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.send = fec_send,
+	.recv = fec_recv,
+	.halt = fec_halt,
+	.write_hwaddr = fec_set_hwaddr
+};
+
+
 static int fec_probe(bd_t *bd, int dev_id, int phy_id, uint32_t base_addr)
 {
 	struct eth_device *edev;
@@ -943,11 +952,7 @@ 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->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;
+	edev->eo = &fec_ops;
 
 	fec->eth = (struct ethernet_regs *)base_addr;
 	fec->bd = bd;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 22/50] net: ftgmac100: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (20 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 21/50] net: fec_mxc: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 23/50] net: greth.c: " Tomas Hlavacek
                   ` (30 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ftgmac100.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 76391c1..7046829 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -525,6 +525,13 @@ static int ftgmac100_send(struct eth_device *dev, void *packet, int length)
 	return 0;
 }
 
+static struct eth_ops ftgmac100_ops = {
+	.init = ftgmac100_init,
+	.halt = ftgmac100_halt,
+	.send = ftgmac100_send,
+	.recv = ftgmac100_recv
+};
+
 int ftgmac100_initialize(bd_t *bd)
 {
 	struct eth_device *dev;
@@ -548,10 +555,7 @@ int ftgmac100_initialize(bd_t *bd)
 
 	sprintf(dev->name, "FTGMAC100");
 	dev->iobase	= CONFIG_FTGMAC100_BASE;
-	dev->eo->init	= ftgmac100_init;
-	dev->eo->halt	= ftgmac100_halt;
-	dev->eo->send	= ftgmac100_send;
-	dev->eo->recv	= ftgmac100_recv;
+	dev->eo		= &ftgmac100_ops;
 	dev->priv	= priv;
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 23/50] net: greth.c: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (21 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 22/50] net: ftgmac100: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 24/50] net: fsl_mcdmafec: " Tomas Hlavacek
                   ` (29 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/greth.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 150dccf..3794005 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -597,6 +597,13 @@ void greth_set_hwaddr(greth_priv * greth, unsigned char *mac)
 	       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
 
+static struct eth_ops greth_ops = {
+	.init = greth_init,
+	.halt = greth_halt,
+	.send = greth_send,
+	.recv = greth_recv
+};
+
 int greth_initialize(bd_t * bis)
 {
 	greth_priv *greth;
@@ -623,10 +630,7 @@ 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->eo->init = greth_init;
-	dev->eo->halt = greth_halt;
-	dev->eo->send = greth_send;
-	dev->eo->recv = greth_recv;
+	dev->eo = &greth_ops;
 	greth->dev = dev;
 
 	/* Reset Core */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 24/50] net: fsl_mcdmafec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (22 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 23/50] net: greth.c: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 25/50] net: inca-ip_sw: " Tomas Hlavacek
                   ` (28 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/fsl_mcdmafec.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 2e70d22..6a18809 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -512,6 +512,13 @@ static void fec_halt(struct eth_device *dev)
 #endif
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int mcdmafec_initialize(bd_t * bis)
 {
 	struct eth_device *dev;
@@ -533,10 +540,7 @@ int mcdmafec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_DMA_USE_INTSRAM
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 25/50] net: inca-ip_sw: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (23 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 24/50] net: fsl_mcdmafec: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 26/50] net: ks8695eth: " Tomas Hlavacek
                   ` (27 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/inca-ip_sw.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index 216122d..ab91553 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -165,6 +165,12 @@ static void inca_init_switch_chip(void);
 static void inca_dma_init(void);
 static int inca_amdix(void);
 
+static struct eth_ops inca_switch_ops = {
+	.init = inca_switch_init,
+	.halt = inca_switch_halt,
+	.send = inca_switch_send,
+	.recv = inca_switch_recv
+};
 
 int inca_switch_initialize(bd_t * bis)
 {
@@ -189,10 +195,7 @@ int inca_switch_initialize(bd_t * bis)
 #endif
 
 	sprintf(dev->name, "INCA-IP Switch");
-	dev->eo->init = inca_switch_init;
-	dev->eo->halt = inca_switch_halt;
-	dev->eo->send = inca_switch_send;
-	dev->eo->recv = inca_switch_recv;
+	dev->eo = &inca_switch_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 26/50] net: ks8695eth: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (24 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 25/50] net: inca-ip_sw: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 27/50] net: lan91c96: " Tomas Hlavacek
                   ` (26 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ks8695eth.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c
index b0703ef..4a5a27e 100644
--- a/drivers/net/ks8695eth.c
+++ b/drivers/net/ks8695eth.c
@@ -220,6 +220,13 @@ static int ks8695_eth_send(struct eth_device *dev, void *packet, int len)
 
 /****************************************************************************/
 
+static struct eth_ops ks8695_eth_ops = {
+	.init = ks8695_eth_init,
+	.halt = ks8695_eth_halt,
+	.send = ks8695_eth_send,
+	.recv = ks8695_eth_recv
+};
+
 int ks8695_eth_initialize(void)
 {
 	struct eth_device *dev;
@@ -230,10 +237,7 @@ int ks8695_eth_initialize(void)
 	memset(dev, 0, sizeof(*dev));
 
 	dev->iobase = KS8695_IO_BASE + KS8695_LAN_DMA_TX;
-	dev->eo->init = ks8695_eth_init;
-	dev->eo->halt = ks8695_eth_halt;
-	dev->eo->send = ks8695_eth_send;
-	dev->eo->recv = ks8695_eth_recv;
+	dev->eo = &ks8695_eth_ops;
 	strcpy(dev->name, "ks8695eth");
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 27/50] net: lan91c96: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (25 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 26/50] net: ks8695eth: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 28/50] net: macb: " Tomas Hlavacek
                   ` (25 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/lan91c96.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index d87302b..4e4e2e4 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -785,6 +785,13 @@ static int lan91c96_detect_chip(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops lan91c96_ops = {
+	.init = lan91c96_init,
+	.halt = lan91c96_halt,
+	.send = lan91c96_send,
+	.recv = lan91c96_recv
+};
+
 int lan91c96_initialize(u8 dev_num, int base_addr)
 {
 	struct eth_device *dev;
@@ -806,10 +813,7 @@ int lan91c96_initialize(u8 dev_num, int base_addr)
 	}
 	get_rom_mac(dev, dev->enetaddr);
 
-	dev->eo->init = lan91c96_init;
-	dev->eo->halt = lan91c96_halt;
-	dev->eo->send = lan91c96_send;
-	dev->eo->recv = lan91c96_recv;
+	dev->eo = &lan91c96_ops;
 	sprintf(dev->name, "%s-%hu", supported_chips[r].name, dev_num);
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 28/50] net: macb: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (26 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 27/50] net: lan91c96: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 29/50] net: mcffec: " Tomas Hlavacek
                   ` (24 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/macb.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 2c53902..c0f1202 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -529,6 +529,14 @@ static int macb_write_hwaddr(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops macb_ops = {
+	.init = macb_init,
+	.halt = macb_halt,
+	.send = macb_send,
+	.recv = macb_recv,
+	.write_hwaddr = macb_write_hwaddr
+};
+
 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 {
 	struct macb_device *macb;
@@ -558,11 +566,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	macb->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "macb%d", id);
-	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;
+	netdev->eo = &macb_ops;
 
 	/*
 	 * Do some basic initialization so that we at least can talk
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 29/50] net: mcffec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (27 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 28/50] net: macb: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 30/50] net: mpc5xxx_fec: " Tomas Hlavacek
                   ` (23 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mcffec.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 0aeb24e..31c8dcd 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -551,6 +551,13 @@ void fec_halt(struct eth_device *dev)
 	memset(info->txbuf, 0, DBUF_LENGTH);
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int mcffec_initialize(bd_t * bis)
 {
 	struct eth_device *dev;
@@ -572,10 +579,7 @@ int mcffec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_FEC_BUF_USE_SRAM
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 30/50] net: mpc5xxx_fec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (28 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 29/50] net: mcffec: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 31/50] net: mvgbe: " Tomas Hlavacek
                   ` (22 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mpc5xxx_fec.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index 73503da..50f8100 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -879,6 +879,12 @@ static int mpc5xxx_fec_recv(struct eth_device *dev)
 	return len;
 }
 
+static struct eth_ops mpc5xxx_fec_ops = {
+	.init = mpc5xxx_fec_init,
+	.halt = mpc5xxx_fec_halt,
+	.send = mpc5xxx_fec_send,
+	.recv = mpc5xxx_fec_recv
+};
 
 /********************************************************************/
 int mpc5xxx_fec_initialize(bd_t * bis)
@@ -915,10 +921,7 @@ int mpc5xxx_fec_initialize(bd_t * bis)
 
 	dev->priv = (void *)fec;
 	dev->iobase = MPC5XXX_FEC;
-	dev->eo->init = mpc5xxx_fec_init;
-	dev->eo->halt = mpc5xxx_fec_halt;
-	dev->eo->send = mpc5xxx_fec_send;
-	dev->eo->recv = mpc5xxx_fec_recv;
+	dev->eo = &mpc5xxx_fec_ops;
 
 	sprintf(dev->name, "FEC");
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 31/50] net: mvgbe: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (29 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 30/50] net: mpc5xxx_fec: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 32/50] net: mpc512x_fec: " Tomas Hlavacek
                   ` (21 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mvgbe.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 6ddb6d6..eeb0741 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -647,6 +647,14 @@ static int mvgbe_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops mvgbe_ops = {
+	.init = (int (*) (struct eth_device *, bd_t *))mvgbe_init,
+	.halt = (void (*) (struct eth_device *))mvgbe_halt,
+	.send = mvgbe_send,
+	.recv = mvgbe_recv,
+	.write_hwaddr = mvgbe_write_hwaddr
+};
+
 int mvgbe_initialize(bd_t *bis)
 {
 	struct mvgbe_device *dmvgbe;
@@ -721,11 +729,7 @@ error1:
 			return -1;
 		}
 
-		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;
+		dev->eo = &mvgbe_ops;
 
 		eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 32/50] net: mpc512x_fec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (30 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 31/50] net: mvgbe: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 33/50] net: natsemi: " Tomas Hlavacek
                   ` (20 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mpc512x_fec.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c
index 4aa3b28..d10a70a 100644
--- a/drivers/net/mpc512x_fec.c
+++ b/drivers/net/mpc512x_fec.c
@@ -608,6 +608,13 @@ static int mpc512x_fec_recv (struct eth_device *dev)
 	return frame_length;
 }
 
+static struct eth_ops mpc512x_fec_ops = {
+	.init = mpc512x_fec_init,
+	.halt = mpc512x_fec_halt,
+	.send = mpc512x_fec_send,
+	.recv = mpc512x_fec_recv
+};
+
 /********************************************************************/
 int mpc512x_fec_initialize (bd_t * bis)
 {
@@ -629,10 +636,7 @@ int mpc512x_fec_initialize (bd_t * bis)
 # endif
 	dev->priv = (void *)fec;
 	dev->iobase = (int)&im->fec;
-	dev->eo->init = mpc512x_fec_init;
-	dev->eo->halt = mpc512x_fec_halt;
-	dev->eo->send = mpc512x_fec_send;
-	dev->eo->recv = mpc512x_fec_recv;
+	dev->eo = &mpc512x_fec_ops;
 
 	sprintf (dev->name, "FEC");
 	eth_register (dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 33/50] net: natsemi: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (31 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 32/50] net: mpc512x_fec: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 34/50] net: ne2000: " Tomas Hlavacek
                   ` (19 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/natsemi.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 4288d1f..a3d78b9 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -273,6 +273,13 @@ OUTL(struct eth_device *dev, int command, u_long addr)
 	*(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command);
 }
 
+static struct eth_ops natsemi_ops = {
+	.init = natsemi_init,
+	.halt = natsemi_disable,
+	.send = natsemi_send,
+	.recv = natsemi_poll
+};
+
 /*
  * Function: natsemi_initialize
  *
@@ -332,10 +339,7 @@ natsemi_initialize(bd_t * bis)
 		printf("natsemi: NatSemi ns8381[56] @ %#x\n", dev->iobase);
 #endif
 		dev->priv = (void *) devno;
-		dev->eo->init = natsemi_init;
-		dev->eo->halt = natsemi_disable;
-		dev->eo->send = natsemi_send;
-		dev->eo->recv = natsemi_poll;
+		dev->eo = &natsemi_ops;
 
 		eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 34/50] net: ne2000: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (32 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 33/50] net: natsemi: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 35/50] net: npe: " Tomas Hlavacek
                   ` (18 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ne2000_base.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 2cc9743..f1fed0e 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -774,6 +774,13 @@ static int ne2k_send(struct eth_device *dev, void *packet, int length)
 	return 0;
 }
 
+static struct eth_ops ne2k_ops = {
+	.init = ne2k_init,
+	.halt = ne2k_halt,
+	.send = ne2k_send,
+	.recv = ne2k_recv
+};
+
 /**
  * Setup the driver for use and register it with the eth layer
  * @return 0 on success, -1 on error (causing caller to print error msg)
@@ -789,10 +796,7 @@ int ne2k_register(void)
 	if (ne2k_setup_driver(dev))
 		return -1;
 
-	dev->eo->init = ne2k_init;
-	dev->eo->halt = ne2k_halt;
-	dev->eo->send = ne2k_send;
-	dev->eo->recv = ne2k_recv;
+	dev->eo = &ne2k_ops;
 
 	sprintf(dev->name, "NE2000");
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 35/50] net: npe: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (33 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 34/50] net: ne2000: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 36/50] net: ns8382x: " Tomas Hlavacek
                   ` (17 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/npe/npe.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/npe/npe.c b/drivers/net/npe/npe.c
index d376c21..adff561 100644
--- a/drivers/net/npe/npe.c
+++ b/drivers/net/npe/npe.c
@@ -576,6 +576,13 @@ static int npe_rx(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops npe_ops = {
+	.init = npe_init,
+	.halt = npe_halt,
+	.send = npe_send,
+	.recv = npe_rx
+};
+
 int npe_initialize(bd_t * bis)
 {
 	static int virgin = 0;
@@ -625,10 +632,7 @@ int npe_initialize(bd_t * bis)
 
 		sprintf(dev->name, "NPE%d", eth_num);
 		dev->priv = (void *)p_npe;
-		dev->eo->init = npe_init;
-		dev->eo->halt = npe_halt;
-		dev->eo->send = npe_send;
-		dev->eo->recv = npe_rx;
+		dev->eo = &npe_ops;
 
 		p_npe->print_speed = 1;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 36/50] net: ns8382x: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (34 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 35/50] net: npe: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 37/50] net: pcnet: " Tomas Hlavacek
                   ` (16 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ns8382x.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index 8b08e0b..c433d3a 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -294,6 +294,14 @@ OUTL(struct eth_device *dev, int command, u_long addr)
 	*(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command);
 }
 
+static struct eth_ops ns8382x_ops = {
+	.init = ns8382x_init,
+	.halt = ns8382x_disable,
+	.send = ns8382x_send,
+	.recv = ns8382x_poll
+};
+
+
 /* Function: ns8382x_initialize
  * Description: Retrieves the MAC address of the card, and sets up some
  *  globals required by other routines, and initializes the NIC, making it
@@ -346,10 +354,7 @@ ns8382x_initialize(bd_t * bis)
 		sprintf(dev->name, "dp8382x#%d", card_number);
 		dev->iobase = bus_to_phys(iobase);
 		dev->priv = (void *) devno;
-		dev->eo->init = ns8382x_init;
-		dev->eo->halt = ns8382x_disable;
-		dev->eo->send = ns8382x_send;
-		dev->eo->recv = ns8382x_poll;
+		dev->eo = &ns8382x_ops;
 
 		/* ns8382x has a non-standard PM control register
 		 * in PCI config space.  Some boards apparently need
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 37/50] net: pcnet: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (35 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 36/50] net: ns8382x: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 38/50] net: plb2800_eth: " Tomas Hlavacek
                   ` (15 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/pcnet.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index 35254c3..8bb8c67 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -154,6 +154,12 @@ static struct pci_device_id supported[] = {
 	{}
 };
 
+static struct eth_ops pcnet_ops = {
+	.init = pcnet_init,
+	.halt = pcnet_halt,
+	.send = pcnet_send,
+	.recv = pcnet_recv
+};
 
 int pcnet_initialize (bd_t * bis)
 {
@@ -216,12 +222,9 @@ int pcnet_initialize (bd_t * bis)
 		}
 
 		/*
-		 * Setup device structure and register the driver.
+		 * Setup device ops and register the driver.
 		 */
-		dev->eo->init = pcnet_init;
-		dev->eo->halt = pcnet_halt;
-		dev->eo->send = pcnet_send;
-		dev->eo->recv = pcnet_recv;
+		dev->eo = &pcnet_ops;
 
 		eth_register (dev);
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 38/50] net: plb2800_eth: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (36 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 37/50] net: pcnet: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 39/50] net: rtl8139: " Tomas Hlavacek
                   ` (14 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/plb2800_eth.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index d3eb692..3b5861f 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -92,6 +92,12 @@ static unsigned char * plb2800_get_mac_addr(void);
 static int rx_new;
 static int mac_addr_set = 0;
 
+static struct eth_ops plb2800_eth_ops = {
+	.init = plb2800_eth_init,
+	.halt = plb2800_eth_halt,
+	.send = plb2800_eth_send,
+	.recv = plb2800_eth_recv
+};
 
 int plb2800_eth_initialize(bd_t * bis)
 {
@@ -110,10 +116,7 @@ int plb2800_eth_initialize(bd_t * bis)
 	memset(dev, 0, sizeof(*dev));
 
 	sprintf(dev->name, "PLB2800 Switch");
-	dev->eo->init = plb2800_eth_init;
-	dev->eo->halt = plb2800_eth_halt;
-	dev->eo->send = plb2800_eth_send;
-	dev->eo->recv = plb2800_eth_recv;
+	dev->eo = &plb2800_eth_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 39/50] net: rtl8139: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (37 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 38/50] net: plb2800_eth: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 40/50] net: rtl8169: " Tomas Hlavacek
                   ` (13 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/rtl8139.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index ed02cf6..15e9f5f 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -200,6 +200,16 @@ static struct pci_device_id supported[] = {
        {}
 };
 
+static struct eth_ops rtl8139_ops = {
+	init = rtl8139_probe,
+	halt = rtl_disable,
+	send = rtl_transmit,
+	recv = rtl_poll,
+#ifdef CONFIG_MCAST_TFTP
+	mcast = rtl_bcast_addr
+#endif
+};
+
 int rtl8139_initialize(bd_t *bis)
 {
 	pci_dev_t devno;
@@ -229,13 +239,7 @@ int rtl8139_initialize(bd_t *bis)
 
 		dev->priv = (void *) devno;
 		dev->iobase = (int)bus_to_phys(iobase);
-		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->eo->mcast = rtl_bcast_addr;
-#endif
+		dev->eo = &rtl8139_ops;
 
 		eth_register (dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 40/50] net: rtl8169: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (38 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 39/50] net: rtl8139: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 41/50] net: smc91111: " Tomas Hlavacek
                   ` (12 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/rtl8169.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c75fd4f..80f8443 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -872,6 +872,14 @@ static int rtl_init(struct eth_device *dev, bd_t *bis)
 	return 1;
 }
 
+static struct eth_ops rtl_ops = {
+	.init = rtl_reset,
+	.halt = rtl_halt,
+	.send = rtl_send,
+	.recv = rtl_recv
+};
+
+
 int rtl8169_initialize(bd_t *bis)
 {
 	pci_dev_t devno;
@@ -902,10 +910,7 @@ int rtl8169_initialize(bd_t *bis)
 		dev->priv = (void *) devno;
 		dev->iobase = (int)pci_mem_to_phys(devno, iobase);
 
-		dev->eo->init = rtl_reset;
-		dev->eo->halt = rtl_halt;
-		dev->eo->send = rtl_send;
-		dev->eo->recv = rtl_recv;
+		dev->eo = &rtl_ops;
 
 		eth_register (dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 41/50] net: smc91111: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (39 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 40/50] net: rtl8169: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 42/50] net: smc911x: " Tomas Hlavacek
                   ` (11 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/smc91111.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 3ea7213..f237ef8 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -1331,6 +1331,14 @@ static void print_packet( byte * buf, int length )
 }
 #endif
 
+static struct eth_ops smc_ops = {
+	.init = smc_init,
+	.halt = smc_halt,
+	.send = smc_send,
+	.recv = smc_rcv,
+	.write_hwaddr = smc_write_hwaddr
+};
+
 int smc91111_initialize(u8 dev_num, int base_addr)
 {
 	struct smc91111_priv *priv;
@@ -1357,11 +1365,7 @@ int smc91111_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[i] = SMC_inb(dev, (ADDR0_REG + i));
 	swap_to(FLASH);
 
-	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;
+	dev->eo = &smc_ops;
 	sprintf(dev->name, "%s-%hu", SMC_DEV_NAME, dev_num);
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 42/50] net: smc911x: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (40 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 41/50] net: smc91111: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 43/50] net: tsec: " Tomas Hlavacek
                   ` (10 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/smc911x.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5ba1bdf..0369376 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -251,6 +251,13 @@ static int smc911x_miiphy_write(const char *devname, u8 phy, u8 reg, u16 val)
 }
 #endif
 
+static struct eth_ops smc911x_ops = {
+	.init = smc911x_init,
+	.halt = smc911x_halt,
+	.send = smc911x_send,
+	.recv = smc911x_rx
+};
+
 int smc911x_initialize(u8 dev_num, int base_addr)
 {
 	unsigned long addrl, addrh;
@@ -282,10 +289,7 @@ int smc911x_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[5] = addrh >> 8;
 	}
 
-	dev->eo->init = smc911x_init;
-	dev->eo->halt = smc911x_halt;
-	dev->eo->send = smc911x_send;
-	dev->eo->recv = smc911x_rx;
+	dev->eo = &smc911x_ops;
 	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
 
 	eth_register(dev);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 43/50] net: tsec: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (41 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 42/50] net: smc911x: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 44/50] net: tsi108_eth: " Tomas Hlavacek
                   ` (9 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/tsec.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 345d563..034f0ed 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -605,6 +605,16 @@ static int init_phy(struct eth_device *dev)
 	return 1;
 }
 
+static struct eth_ops tsec_ops = {
+	.init = tsec_init,
+	.halt = tsec_halt,
+	.send = tsec_send,
+	.recv = tsec_recv,
+#ifdef CONFIG_MCAST_TFTP
+	.mcast = tsec_mcast_addr
+#endif
+};
+
 /* Initialize device structure. Returns success if PHY
  * initialization succeeded (i.e. if it recognizes the PHY)
  */
@@ -638,13 +648,7 @@ 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->eo->init = tsec_init;
-	dev->eo->halt = tsec_halt;
-	dev->eo->send = tsec_send;
-	dev->eo->recv = tsec_recv;
-#ifdef CONFIG_MCAST_TFTP
-	dev->eo->mcast = tsec_mcast_addr;
-#endif
+	dev->eo = &tsec_ops;
 
 	/* Tell u-boot to get the addr from the env */
 	for (i = 0; i < 6; i++)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 44/50] net: tsi108_eth: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (42 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 43/50] net: tsec: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 45/50] net: uli526x: " Tomas Hlavacek
                   ` (8 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/tsi108_eth.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index bed09d5..ea26c2c 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -718,6 +718,13 @@ static int marvell_88e_phy_config (struct eth_device *dev, int *speed,
 	return 1;
 }
 
+static struct eth_ops tsi108_eth_ops = {
+	.init = tsi108_eth_probe,
+	.halt = tsi108_eth_halt,
+	.send = tsi108_eth_send,
+	.recv = tsi108_eth_recv
+};
+
 /*
  * External interface
  *
@@ -739,10 +746,7 @@ int tsi108_eth_initialize (bd_t * bis)
 
 		dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
 		dev->priv = (void *)(phy_address[index]);
-		dev->eo->init = tsi108_eth_probe;
-		dev->eo->halt = tsi108_eth_halt;
-		dev->eo->send = tsi108_eth_send;
-		dev->eo->recv = tsi108_eth_recv;
+		dev->eo = &tsi108_eth_ops;
 
 		eth_register(dev);
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 45/50] net: uli526x: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (43 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 44/50] net: tsi108_eth: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 46/50] net: xilinx_axi_emac: " Tomas Hlavacek
                   ` (7 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/uli526x.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 33d8b49..65670db 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -198,6 +198,13 @@ static struct pci_device_id uli526x_pci_tbl[] = {
 	{}
 };
 
+static struct eth_ops uli526x_ops = {
+	.init = uli526x_init_one,
+	.halt = uli526x_disable,
+	.send = uli526x_start_xmit,
+	.recv = uli526x_rx_packet
+};
+
 /* ULI526X network board routine */
 
 /*
@@ -237,10 +244,7 @@ int uli526x_initialize(bd_t *bis)
 		db->pdev = devno;
 		dev->iobase = iobase;
 
-		dev->eo->init = uli526x_init_one;
-		dev->eo->halt = uli526x_disable;
-		dev->eo->send = uli526x_start_xmit;
-		dev->eo->recv = uli526x_rx_packet;
+		dev->eo = &uli526x_ops;
 
 		/* init db */
 		db->ioaddr = dev->iobase;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 46/50] net: xilinx_axi_emac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (44 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 45/50] net: uli526x: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 47/50] net: xilinx_emaclite: " Tomas Hlavacek
                   ` (6 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_axi_emac.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 54a871b..44ece48 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -622,6 +622,15 @@ static int axiemac_bus_reset(struct mii_dev *bus)
 	return 0;
 }
 
+static struct eth_ops axiemac_ops = {
+	.init = axiemac_init,
+	.halt = axiemac_halt,
+	.send = axiemac_send,
+	.recv = axiemac_recv,
+	.write_hwaddr = axiemac_setup_mac
+};
+
+
 int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr,
 							unsigned long dma_addr)
 {
@@ -645,11 +654,7 @@ 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->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;
+	dev->eo = &axiemac_ops;
 
 #ifdef CONFIG_PHY_ADDR
 	priv->phyaddr = CONFIG_PHY_ADDR;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 47/50] net: xilinx_emaclite: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (45 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 46/50] net: xilinx_axi_emac: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 48/50] net: zynq_gem: " Tomas Hlavacek
                   ` (5 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_emaclite.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index c0fefa7..b5be0a3 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -345,6 +345,13 @@ static int emaclite_recv(struct eth_device *dev)
 
 }
 
+static struct eth_ops emaclite_ops = {
+	init = emaclite_init,
+	halt = emaclite_halt,
+	send = emaclite_send,
+	recv = emaclite_recv
+};
+
 int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
 							int txpp, int rxpp)
 {
@@ -369,10 +376,7 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
 	sprintf(dev->name, "Xelite.%lx", base_addr);
 
 	dev->iobase = base_addr;
-	dev->eo->init = emaclite_init;
-	dev->eo->halt = emaclite_halt;
-	dev->eo->send = emaclite_send;
-	dev->eo->recv = emaclite_recv;
+	dev->eo = &emaclite_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 48/50] net: zynq_gem: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (46 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 47/50] net: xilinx_emaclite: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 49/50] net: xilinx_ll_temac: " Tomas Hlavacek
                   ` (4 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/zynq_gem.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 3cba176..0a9a0f0 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -399,6 +399,14 @@ static int zynq_gem_miiphy_write(const char *devname, uchar addr,
 	return phywrite(dev, addr, reg, val);
 }
 
+static struct eth_ops zynq_gem_ops = {
+	.init = zynq_gem_init,
+	.halt = zynq_gem_halt,
+	.send = zynq_gem_send,
+	.recv = zynq_gem_recv,
+	.write_hwaddr = zynq_gem_setup_mac
+};
+
 int zynq_gem_initialize(bd_t *bis, int base_addr)
 {
 	struct eth_device *dev;
@@ -425,11 +433,7 @@ int zynq_gem_initialize(bd_t *bis, int base_addr)
 
 	dev->iobase = base_addr;
 
-	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;
+	dev->eo = &zynq_gem_ops;
 
 	eth_register(dev);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 49/50] net: xilinx_ll_temac: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (47 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 48/50] net: zynq_gem: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 50/50] net: sh_eth: " Tomas Hlavacek
                   ` (3 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_ll_temac.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
index 8f67417..5f52251 100644
--- a/drivers/net/xilinx_ll_temac.c
+++ b/drivers/net/xilinx_ll_temac.c
@@ -282,6 +282,24 @@ static int ll_temac_phy_init(struct eth_device *dev)
 	return 1;
 }
 
+static struct eth_ops ll_temac_ops_sdma = {
+	.init = ll_temac_init,
+	.halt = ll_temac_halt,
+	.write_hwaddr = ll_temac_setup_mac_addr,
+	.recv = ll_temac_recv_sdma,
+	.send = ll_temac_send_sdma
+};
+
+static struct eth_ops ll_temac_ops_fifo = {
+	.init = ll_temac_init,
+	.halt = ll_temac_halt,
+	.write_hwaddr = ll_temac_setup_mac_addr,
+	.recv = ll_temac_recv_fifo,
+	.send = ll_temac_send_fifo
+};
+
+
+
 /*
  * Initialize a single ll_temac devices
  *
@@ -313,9 +331,6 @@ int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 	dev->iobase = devinf->base_addr;
 
 	dev->priv = ll_temac;
-	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 +349,14 @@ 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->eo->recv = ll_temac_recv_sdma;
-		dev->eo->send = ll_temac_send_sdma;
+		dev->eo = &ll_temac_ops_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->eo->recv = ll_temac_recv_fifo;
-		dev->eo->send = ll_temac_send_fifo;
+		dev->eo = &ll_temac_ops_fifo;
 	}
 
 	/* Link to specified MDIO bus */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 50/50] net: sh_eth: Pull out init of struct eth_ops
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (48 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 49/50] net: xilinx_ll_temac: " Tomas Hlavacek
@ 2012-11-02 17:18 ` Tomas Hlavacek
  2012-11-02 17:24 ` [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Marek Vasut
                   ` (2 subsequent siblings)
  52 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-02 17:18 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/sh_eth.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 1f8d0c1..e801bcb 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -502,6 +502,13 @@ void sh_eth_halt(struct eth_device *dev)
 	sh_eth_stop(eth);
 }
 
+static struct eth_ops sh_eth_ops = {
+	.init = sh_eth_init,
+	.halt = sh_eth_halt,
+	.send = sh_eth_send,
+	.recv = sh_eth_recv
+};
+
 int sh_eth_initialize(bd_t *bd)
 {
     int ret = 0;
@@ -529,10 +536,7 @@ int sh_eth_initialize(bd_t *bd)
 
     dev->priv = (void *)eth;
     dev->iobase = 0;
-	dev->eo->init = sh_eth_init;
-	dev->eo->halt = sh_eth_halt;
-	dev->eo->send = sh_eth_send;
-	dev->eo->recv = sh_eth_recv;
+	dev->eo = &sh_eth_ops;
     eth->port_info[eth->port].dev = dev;
 
 	sprintf(dev->name, SHETHER_NAME);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (49 preceding siblings ...)
  2012-11-02 17:18 ` [U-Boot] [RFC PATCH 50/50] net: sh_eth: " Tomas Hlavacek
@ 2012-11-02 17:24 ` Marek Vasut
  2012-11-03 15:09 ` Wolfgang Denk
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
  52 siblings, 0 replies; 127+ messages in thread
From: Marek Vasut @ 2012-11-02 17:24 UTC (permalink / raw)
  To: u-boot

Dear Tomas Hlavacek,

> This patchset is a first stage of preparation of the net subsystem
> for the driver model.
> 
> The idea of this patchset is:
> 1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
>    Add a sparate structure eth_ops which is ready for inclusion
>    to DM core.
> 2) Replace dynamic init of ops function pointers by static struct.
> 3) Do minor style cleanup.

CCing Joe ...

> Tomas Hlavacek (50):
>   net: dm: Pull out ops from struct eth_device
>   net: 4xx_enet: Pull out init of struct eth_ops
>   net: altera_tse: Pull out init of struct eth_ops
>   net: dm9000x: Pull out init of struct eth_ops
>   net: armada100_fec: Pull out init of struct eth_ops
>   net: at91_emac: Pull out init of struct eth_ops
>   net: ax88180: Pull out init of struct eth_ops
>   net: bfin_mac: Pull out init of struct eth_ops
>   net: calxedaxgmac: Pull out init of struct eth_ops
>   net: cpsw: Pull out init of struct eth_ops
>   net: cs8900: Pull out init of struct eth_ops
>   net: davinci_emac: Pull out init of struct eth_ops
>   net: dc2114x: Pull out init of struct eth_ops
>   net: designware: Pull out init of struct eth_ops
>   net: dnet: Pull out init of struct eth_ops
>   net: e1000: Pull out init of struct eth_ops
>   net: eepro100: Pull out init of struct eth_ops
>   net: enc28j60: Pull out init of struct eth_ops
>   net: ep93xx_eth: Pull out init of struct eth_ops
>   net: ethoc: Pull out init of struct eth_ops
>   net: fec_mxc: Pull out init of struct eth_ops
>   net: ftgmac100: Pull out init of struct eth_ops
>   net: greth.c: Pull out init of struct eth_ops
>   net: fsl_mcdmafec: Pull out init of struct eth_ops
>   net: inca-ip_sw: Pull out init of struct eth_ops
>   net: ks8695eth: Pull out init of struct eth_ops
>   net: lan91c96: Pull out init of struct eth_ops
>   net: macb: Pull out init of struct eth_ops
>   net: mcffec: Pull out init of struct eth_ops
>   net: mpc5xxx_fec: Pull out init of struct eth_ops
>   net: mvgbe: Pull out init of struct eth_ops
>   net: mpc512x_fec: Pull out init of struct eth_ops
>   net: natsemi: Pull out init of struct eth_ops
>   net: ne2000: Pull out init of struct eth_ops
>   net: npe: Pull out init of struct eth_ops
>   net: ns8382x: Pull out init of struct eth_ops
>   net: pcnet: Pull out init of struct eth_ops
>   net: plb2800_eth: Pull out init of struct eth_ops
>   net: rtl8139: Pull out init of struct eth_ops
>   net: rtl8169: Pull out init of struct eth_ops
>   net: smc91111: Pull out init of struct eth_ops
>   net: smc911x: Pull out init of struct eth_ops
>   net: tsec: Pull out init of struct eth_ops
>   net: tsi108_eth: Pull out init of struct eth_ops
>   net: uli526x: Pull out init of struct eth_ops
>   net: xilinx_axi_emac: Pull out init of struct eth_ops
>   net: xilinx_emaclite: Pull out init of struct eth_ops
>   net: zynq_gem: Pull out init of struct eth_ops
>   net: xilinx_ll_temac: Pull out init of struct eth_ops
>   net: sh_eth: Pull out init of struct eth_ops
> 
>  board/davinci/da8xxevm/da830evm.c |    2 +-
>  drivers/net/4xx_enet.c            |   12 ++++++++----
>  drivers/net/altera_tse.c          |   14 +++++++++-----
>  drivers/net/armada100_fec.c       |   12 ++++++++----
>  drivers/net/at91_emac.c           |   14 +++++++++-----
>  drivers/net/ax88180.c             |   13 +++++++++----
>  drivers/net/bfin_mac.c            |   14 +++++++++-----
>  drivers/net/calxedaxgmac.c        |   14 ++++++++++----
>  drivers/net/cpsw.c                |   12 ++++++++----
>  drivers/net/cs8900.c              |   12 ++++++++----
>  drivers/net/davinci_emac.c        |   14 +++++++++-----
>  drivers/net/dc2114x.c             |   14 +++++++++-----
>  drivers/net/designware.c          |   14 +++++++++-----
>  drivers/net/dm9000x.c             |   12 ++++++++----
>  drivers/net/dnet.c                |   14 +++++++++-----
>  drivers/net/e1000.c               |   12 ++++++++----
>  drivers/net/eepro100.c            |   12 ++++++++----
>  drivers/net/enc28j60.c            |   14 +++++++++-----
>  drivers/net/ep93xx_eth.c          |   12 ++++++++----
>  drivers/net/ethoc.c               |   14 +++++++++-----
>  drivers/net/fec_mxc.c             |   15 ++++++++++-----
>  drivers/net/fm/eth.c              |    8 ++++----
>  drivers/net/fsl_mcdmafec.c        |   12 ++++++++----
>  drivers/net/ftgmac100.c           |   12 ++++++++----
>  drivers/net/ftmac100.c            |    8 ++++----
>  drivers/net/greth.c               |   12 ++++++++----
>  drivers/net/inca-ip_sw.c          |   11 +++++++----
>  drivers/net/ks8695eth.c           |   12 ++++++++----
>  drivers/net/lan91c96.c            |   12 ++++++++----
>  drivers/net/macb.c                |   14 +++++++++-----
>  drivers/net/mcffec.c              |   12 ++++++++----
>  drivers/net/mpc512x_fec.c         |   12 ++++++++----
>  drivers/net/mpc5xxx_fec.c         |   11 +++++++----
>  drivers/net/mvgbe.c               |   14 +++++++++-----
>  drivers/net/natsemi.c             |   12 ++++++++----
>  drivers/net/ne2000_base.c         |   12 ++++++++----
>  drivers/net/npe/npe.c             |   12 ++++++++----
>  drivers/net/ns8382x.c             |   13 +++++++++----
>  drivers/net/pcnet.c               |   13 ++++++++-----
>  drivers/net/plb2800_eth.c         |   11 +++++++----
>  drivers/net/rtl8139.c             |   18 +++++++++++-------
>  drivers/net/rtl8169.c             |   13 +++++++++----
>  drivers/net/sh_eth.c              |   12 ++++++++----
>  drivers/net/smc91111.c            |   14 +++++++++-----
>  drivers/net/smc911x.c             |   12 ++++++++----
>  drivers/net/tsec.c                |   18 +++++++++++-------
>  drivers/net/tsi108_eth.c          |   12 ++++++++----
>  drivers/net/uli526x.c             |   12 ++++++++----
>  drivers/net/xilinx_axi_emac.c     |   15 ++++++++++-----
>  drivers/net/xilinx_emaclite.c     |   12 ++++++++----
>  drivers/net/xilinx_ll_temac.c     |   27 ++++++++++++++++++++-------
>  drivers/net/zynq_gem.c            |   14 +++++++++-----
>  drivers/usb/eth/asix.c            |   10 +++++-----
>  drivers/usb/eth/smsc95xx.c        |   10 +++++-----
>  include/net.h                     |   17 +++++++++++------
>  net/eth.c                         |   16 ++++++++--------
>  56 files changed, 467 insertions(+), 254 deletions(-)

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (50 preceding siblings ...)
  2012-11-02 17:24 ` [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Marek Vasut
@ 2012-11-03 15:09 ` Wolfgang Denk
  2012-11-03 23:23   ` Tomas Hlavacek
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
  52 siblings, 1 reply; 127+ messages in thread
From: Wolfgang Denk @ 2012-11-03 15:09 UTC (permalink / raw)
  To: u-boot

Dear Tomas Hlavacek,

In message <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> you wrote:
> This patchset is a first stage of preparation of the net subsystem
> for the driver model.
> 
> The idea of this patchset is:
> 1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
>    Add a sparate structure eth_ops which is ready for inclusion
>    to DM core.
> 2) Replace dynamic init of ops function pointers by static struct.
> 3) Do minor style cleanup.
> 
> Tomas Hlavacek (50):
>   net: dm: Pull out ops from struct eth_device
>   net: 4xx_enet: Pull out init of struct eth_ops
>   net: altera_tse: Pull out init of struct eth_ops
>   net: dm9000x: Pull out init of struct eth_ops
>   net: armada100_fec: Pull out init of struct eth_ops

Hm... looking at this patch series, I wonder if it is really
bisectable?  Can I really apply any number of these patches (the first
N, with N < 50) and expect the code to build and to work?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Put your Nose to the Grindstone!
                 -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
  2012-11-03 15:09 ` Wolfgang Denk
@ 2012-11-03 23:23   ` Tomas Hlavacek
  2012-11-14  0:06     ` Joe Hershberger
  0 siblings, 1 reply; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-03 23:23 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang,

On Sat, Nov 3, 2012 at 4:09 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Tomas Hlavacek,
>
> In message <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> you wrote:
>> This patchset is a first stage of preparation of the net subsystem
>> for the driver model.
>>
>> The idea of this patchset is:
>> 1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
>>    Add a sparate structure eth_ops which is ready for inclusion
>>    to DM core.
>> 2) Replace dynamic init of ops function pointers by static struct.
>> 3) Do minor style cleanup.
>>
>> Tomas Hlavacek (50):
>>   net: dm: Pull out ops from struct eth_device
>>   net: 4xx_enet: Pull out init of struct eth_ops
>>   net: altera_tse: Pull out init of struct eth_ops
>>   net: dm9000x: Pull out init of struct eth_ops
>>   net: armada100_fec: Pull out init of struct eth_ops
>
> Hm... looking at this patch series, I wonder if it is really
> bisectable?  Can I really apply any number of these patches (the first
> N, with N < 50) and expect the code to build and to work?

It should be, because the first patch adds new struct eth_ops and
changes all accesses to its' members in one step. Patches 2 .. 50
remove dynamic ops settings and add static initialization to each
affected driver - one patch per driver. I would rather try that by
compiling U-Boot with only 1/50 applied and after some random N, say
30/50 to be absolutely sure. Let me get back later when I have my
MAKEALL results.

Tomas

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
  2012-11-03 23:23   ` Tomas Hlavacek
@ 2012-11-14  0:06     ` Joe Hershberger
  2012-11-20  2:06       ` Tomas Hlavacek
  0 siblings, 1 reply; 127+ messages in thread
From: Joe Hershberger @ 2012-11-14  0:06 UTC (permalink / raw)
  To: u-boot

Hi Tomas,

On Sat, Nov 3, 2012 at 6:23 PM, Tomas Hlavacek <tmshlvck@gmail.com> wrote:
> Dear Wolfgang,
>
> On Sat, Nov 3, 2012 at 4:09 PM, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Tomas Hlavacek,
>>
>> In message <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> you wrote:
>>> This patchset is a first stage of preparation of the net subsystem
>>> for the driver model.
>>>
>>> The idea of this patchset is:
>>> 1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
>>>    Add a sparate structure eth_ops which is ready for inclusion
>>>    to DM core.
>>> 2) Replace dynamic init of ops function pointers by static struct.
>>> 3) Do minor style cleanup.
>>>
>>> Tomas Hlavacek (50):
>>>   net: dm: Pull out ops from struct eth_device
>>>   net: 4xx_enet: Pull out init of struct eth_ops
>>>   net: altera_tse: Pull out init of struct eth_ops
>>>   net: dm9000x: Pull out init of struct eth_ops
>>>   net: armada100_fec: Pull out init of struct eth_ops
>>
>> Hm... looking at this patch series, I wonder if it is really
>> bisectable?  Can I really apply any number of these patches (the first
>> N, with N < 50) and expect the code to build and to work?
>
> It should be, because the first patch adds new struct eth_ops and
> changes all accesses to its' members in one step. Patches 2 .. 50
> remove dynamic ops settings and add static initialization to each
> affected driver - one patch per driver. I would rather try that by
> compiling U-Boot with only 1/50 applied and after some random N, say
> 30/50 to be absolutely sure. Let me get back later when I have my
> MAKEALL results.

Have you completed this bisectability test yet?  How about run
testing?  What boards did you test this on?

Thanks,
-Joe

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup
  2012-11-14  0:06     ` Joe Hershberger
@ 2012-11-20  2:06       ` Tomas Hlavacek
  0 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-20  2:06 UTC (permalink / raw)
  To: u-boot

Hello Joe!

On Wed, Nov 14, 2012 at 1:06 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Tomas,
>
> On Sat, Nov 3, 2012 at 6:23 PM, Tomas Hlavacek <tmshlvck@gmail.com> wrote:
>> Dear Wolfgang,
>>
>> On Sat, Nov 3, 2012 at 4:09 PM, Wolfgang Denk <wd@denx.de> wrote:
>>> Dear Tomas Hlavacek,
>>>
>>> In message <1351876722-5183-1-git-send-email-tmshlvck@gmail.com> you wrote:
>>>> This patchset is a first stage of preparation of the net subsystem
>>>> for the driver model.
>>>>
>>>> The idea of this patchset is:
>>>> 1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
>>>>    Add a sparate structure eth_ops which is ready for inclusion
>>>>    to DM core.
>>>> 2) Replace dynamic init of ops function pointers by static struct.
>>>> 3) Do minor style cleanup.
>>>>
>>>> Tomas Hlavacek (50):
>>>>   net: dm: Pull out ops from struct eth_device
>>>>   net: 4xx_enet: Pull out init of struct eth_ops
>>>>   net: altera_tse: Pull out init of struct eth_ops
>>>>   net: dm9000x: Pull out init of struct eth_ops
>>>>   net: armada100_fec: Pull out init of struct eth_ops
>>>
>>> Hm... looking at this patch series, I wonder if it is really
>>> bisectable?  Can I really apply any number of these patches (the first
>>> N, with N < 50) and expect the code to build and to work?
>>
>> It should be, because the first patch adds new struct eth_ops and
>> changes all accesses to its' members in one step. Patches 2 .. 50
>> remove dynamic ops settings and add static initialization to each
>> affected driver - one patch per driver. I would rather try that by
>> compiling U-Boot with only 1/50 applied and after some random N, say
>> 30/50 to be absolutely sure. Let me get back later when I have my
>> MAKEALL results.
>
> Have you completed this bisectability test yet?  How about run
> testing?  What boards did you test this on?

Yes. In fact I have found some problems during the process, so I have
a new updated patch series almost ready. I will send it tomorrow.

I tested it on all ARM, MIPS, PowerPC and x86 boards. I tried to
verify cover of drivers by this tests by means of git grep but I have
to admit that I may be still missing some boards hidden in boards/* or
arch/* ... :-(

Tomas

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup
  2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
                   ` (51 preceding siblings ...)
  2012-11-03 15:09 ` Wolfgang Denk
@ 2012-11-21 13:22 ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 01/67] net: dm: Pull out ops from struct eth_device Tomas Hlavacek
                     ` (68 more replies)
  52 siblings, 69 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

This patchi series is a first stage of preparation of the net subsystem
for the driver model.

The idea of this patchset is:
1) Remove ops .init, .send, .recv and .halt from the eth_device struct.
   Add a sparate structure eth_ops which is ready for inclusion to DM core.
2) Replace dynamic init of ops function pointers by static struct.
3) Do minor style cleanup.

There are binary size changes. Example:

before the series applied:

Configuring for colibri_pxa270 board...
   text    data     bss     dec     hex filename
 247910    4412  272348  524670   8017e ./u-boot

and after:

Configuring for colibri_pxa270 board...
   text    data     bss     dec     hex filename
 247878    4432  272368  524678   80186 ./u-boot

Changes in v2:
  - Fix hidden drivers in arch/*
  - Prove bisectability:

MAKEALL arm (1/67 applied):
Boards compiled: 274

MAKEALL arm (49/67 applied):
Boards compiled: 274

MAKEALL arm (67/67 applied):
Boards compiled: 274

MAKEALL mips (1/67 applied):
Boards compiled: 21

MAKEALL mips (49/67 applied):
Boards compiled: 21

MAKEALL mips (67/67 applied):
Boards compiled: 21

MAKEALL powepc (1/67 applied):
Boards compiled: 623

MAKEALL powepc (49/67 applied):
Boards compiled: 623

MAKEALL powepc (67/67 applied):
Boards compiled: 623


Tomas Hlavacek (67):
  net: dm: Pull out ops from struct eth_device
  net: 4xx_enet: Pull out init of struct eth_ops
  net: altera_tse: Pull out init of struct eth_ops
  net: dm9000x: Pull out init of struct eth_ops
  net: armada100_fec: Pull out init of struct eth_ops
  net: at91_emac: Pull out init of struct eth_ops
  net: ax88180: Pull out init of struct eth_ops
  net: bfin_mac: Pull out init of struct eth_ops
  net: calxedaxgmac: Pull out init of struct eth_ops
  net: cs8900: Pull out init of struct eth_ops
  net: davinci_emac: Pull out init of struct eth_ops
  net: dc2114x: Pull out init of struct eth_ops
  net: designware: Pull out init of struct eth_ops
  net: dnet: Pull out init of struct eth_ops
  net: e1000: Pull out init of struct eth_ops
  net: eepro100: Pull out init of struct eth_ops
  net: enc28j60: Pull out init of struct eth_ops
  net: ep93xx_eth: Pull out init of struct eth_ops
  net: ethoc: Pull out init of struct eth_ops
  net: fec_mxc: Pull out init of struct eth_ops
  net: ftgmac100: Pull out init of struct eth_ops
  net: greth.c: Pull out init of struct eth_ops
  net: fsl_mcdmafec: Pull out init of struct eth_ops
  net: inca-ip_sw: Pull out init of struct eth_ops
  net: ks8695eth: Pull out init of struct eth_ops
  net: lan91c96: Pull out init of struct eth_ops
  net: macb: Pull out init of struct eth_ops
  net: mcffec: Pull out init of struct eth_ops
  net: mpc5xxx_fec: Pull out init of struct eth_ops
  net: mvgbe: Pull out init of struct eth_ops
  net: mpc512x_fec: Pull out init of struct eth_ops
  net: natsemi: Pull out init of struct eth_ops
  net: ne2000: Pull out init of struct eth_ops
  net: npe: Pull out init of struct eth_ops
  net: ns8382x: Pull out init of struct eth_ops
  net: pcnet: Pull out init of struct eth_ops
  net: plb2800_eth: Pull out init of struct eth_ops
  net: rtl8139: Pull out init of struct eth_ops
  net: rtl8169: Pull out init of struct eth_ops
  net: smc91111: Pull out init of struct eth_ops
  net: smc911x: Pull out init of struct eth_ops
  net: tsec: Pull out init of struct eth_ops
  net: tsi108_eth: Pull out init of struct eth_ops
  net: uli526x: Pull out init of struct eth_ops
  net: xilinx_axi_emac: Pull out init of struct eth_ops
  net: xilinx_emaclite: Pull out init of struct eth_ops
  net: zynq_gem: Pull out init of struct eth_ops
  net: xilinx_ll_temac: Pull out init of struct eth_ops
  net: sh_eth: Pull out init of struct eth_ops
  net: au1x00_eth: Pull out init of struct eth_ops
  net: mpc8220_fec: Pull out init of struct eth_ops
  net: mpc8260_fec: Pull out init of struct eth_ops
  net: mpc8260_scc: Pull out init of struct eth_ops
  net: mpc85xx_fec: Pull out init of struct eth_ops
  net: mpc8xx_scc: Pull out init of struct eth_ops
  net: db64360/mv_eth: Pull out init of struct eth_ops
  net: mpc8xx_fec: Pull out init of struct eth_ops
  net: db64460/mv_eth: Pull out init of struct eth_ops
  net: cpci750/mv_eth: Pull out init of struct eth_ops
  net: evb64260: Pull out init of struct eth_ops
  net: p3mx/mv_eth: Pull out init of struct eth_ops
  net: cpsw: Pull out init of struct eth_ops
  net: fm_eth: Pull out init of struct eth_ops
  net: ftmac100: Pull out init of struct eth_ops
  net: qe: uec: Pull out init of struct eth_ops
  net: usb: asix: Pull out init of struct eth_ops
  net: usb: smsc95xx: Pull out init of struct eth_ops

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

-- 
1.7.2.5

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 01/67] net: dm: Pull out ops from struct eth_device
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 02/67] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
                     ` (67 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

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(-)

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
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 02/67] net: 4xx_enet: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 01/67] net: dm: Pull out ops from struct eth_device Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 03/67] net: altera_tse: " Tomas Hlavacek
                     ` (66 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/4xx_enet.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 27b66dd..309e616 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1905,6 +1905,13 @@ static int ppc_4xx_eth_rx (struct eth_device *dev)
 	return length;
 }
 
+static struct eth_ops ppc_4xx_eth_ops = {
+	.init = ppc_4xx_eth_init,
+	.send = ppc_4xx_eth_send,
+	.recv = ppc_4xx_eth_rx,
+	.halt = ppc_4xx_eth_halt
+};
+
 int ppc_4xx_eth_initialize (bd_t * bis)
 {
 	static int virgin = 0;
@@ -2023,10 +2030,7 @@ 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->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;
+		dev->eo = &ppc_4xx_eth_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 03/67] net: altera_tse: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 01/67] net: dm: Pull out ops from struct eth_device Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 02/67] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 04/67] net: dm9000x: " Tomas Hlavacek
                     ` (65 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers	statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/altera_tse.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index ee1a1f6..89cd23e 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -890,6 +890,14 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd)
 	return priv->link ? 0 : -1;
 }
 
+static struct eth_ops altera_tse_ops = {
+	.init = tse_eth_init,
+	.halt = tse_eth_halt,
+	.send = tse_eth_send,
+	.recv = tse_eth_rx,
+	.write_hwaddr = tse_set_mac_address
+};
+
 /* TSE init code */
 int altera_tse_initialize(u8 dev_num, int mac_base,
 			  int sgdma_rx_base, int sgdma_tx_base,
@@ -951,11 +959,7 @@ int altera_tse_initialize(u8 dev_num, int mac_base,
 
 	/* init eth structure */
 	dev->priv = priv;
-	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;
+	dev->eo = &altera_tse_ops;
 	sprintf(dev->name, "%s-%hu", "ALTERA_TSE", dev_num);
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 04/67] net: dm9000x: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (2 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 03/67] net: altera_tse: " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 05/67] net: armada100_fec: " Tomas Hlavacek
                     ` (64 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dm9000x.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index bd96948..f6b226c 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -623,6 +623,13 @@ dm9000_phy_write(int reg, u16 value)
 	DM9000_DBG("dm9000_phy_write(reg:0x%x, value:0x%x)\n", reg, value);
 }
 
+static struct eth_ops dm9000_ops = {
+	.init = dm9000_init,
+	.send = dm9000_send,
+	.recv = dm9000_rx,
+	.halt = dm9000_halt
+};
+
 int dm9000_initialize(bd_t *bis)
 {
 	struct eth_device *dev = &(dm9000_info.netdev);
@@ -630,10 +637,7 @@ int dm9000_initialize(bd_t *bis)
 	/* Load MAC address from EEPROM */
 	dm9000_get_enetaddr(dev);
 
-	dev->eo->init = dm9000_init;
-	dev->eo->halt = dm9000_halt;
-	dev->eo->send = dm9000_send;
-	dev->eo->recv = dm9000_rx;
+	dev->eo = &dm9000_ops;
 	sprintf(dev->name, "dm9000");
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 05/67] net: armada100_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (3 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 04/67] net: dm9000x: " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 06/67] net: at91_emac: " Tomas Hlavacek
                     ` (63 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/armada100_fec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index f256381..d826e11 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -678,6 +678,13 @@ static int armdfec_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops armada100_fec_ops = {
+	.init = armdfec_init,
+	.halt = armdfec_halt,
+	.send = armdfec_send,
+	.recv = armdfec_recv
+};
+
 int armada100_fec_register(unsigned long base_addr)
 {
 	struct armdfec_device *darmdfec;
@@ -718,10 +725,7 @@ int armada100_fec_register(unsigned long base_addr)
 	/* must be less than sizeof(dev->name) */
 	strcpy(dev->name, "armd-fec0");
 
-	dev->eo->init = armdfec_init;
-	dev->eo->halt = armdfec_halt;
-	dev->eo->send = armdfec_send;
-	dev->eo->recv = armdfec_recv;
+	dev->eo = &armada100_fec_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 06/67] net: at91_emac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (4 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 05/67] net: armada100_fec: " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 07/67] net: ax88180: " Tomas Hlavacek
                     ` (62 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/at91_emac.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index 3395dcc..464d539 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -494,6 +494,14 @@ static int at91emac_write_hwaddr(struct eth_device *netdev)
 	return 0;
 }
 
+static struct eth_ops at91emac_ops = {
+	.init = at91emac_init,
+	.halt = at91emac_halt,
+	.send = at91emac_send,
+	.recv = at91emac_recv,
+	.write_hwaddr = at91emac_write_hwaddr
+};
+
 int at91emac_register(bd_t *bis, unsigned long iobase)
 {
 	emac_device *emac;
@@ -518,11 +526,7 @@ int at91emac_register(bd_t *bis, unsigned long iobase)
 	sprintf(dev->name, "emac");
 	dev->iobase = iobase;
 	dev->priv = emacfix;
-	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;
+	dev->eo = &at91emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 07/67] net: ax88180: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (5 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 06/67] net: at91_emac: " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 08/67] net: bfin_mac: " Tomas Hlavacek
                     ` (61 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ax88180.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ax88180.c b/drivers/net/ax88180.c
index 464f261..fc237ba 100644
--- a/drivers/net/ax88180.c
+++ b/drivers/net/ax88180.c
@@ -698,6 +698,14 @@ static void ax88180_read_mac_addr (struct eth_device *dev)
 	}
 }
 
+static struct eth_ops ax88180_ops = {
+	.init = ax88180_init,
+	.halt = ax88180_halt,
+	.send = ax88180_send,
+	.recv = ax88180_recv
+};
+
+
 /*
 ===========================================================================
 <<<<<<			Exported SubProgram Bodies		>>>>>>
@@ -725,10 +733,7 @@ int ax88180_initialize (bd_t * bis)
 	sprintf (dev->name, "ax88180");
 	dev->iobase = AX88180_BASE;
 	dev->priv = priv;
-	dev->eo->init = ax88180_init;
-	dev->eo->halt = ax88180_halt;
-	dev->eo->send = ax88180_send;
-	dev->eo->recv = ax88180_recv;
+	dev->eo = &ax88180_ops;
 
 	priv->BusWidth = BUS_WIDTH_32;
 	priv->PadSize = 3;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 08/67] net: bfin_mac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (6 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 07/67] net: ax88180: " Tomas Hlavacek
@ 2012-11-21 13:22   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 09/67] net: calxedaxgmac: " Tomas Hlavacek
                     ` (60 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:22 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/bfin_mac.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index ef4736f..b2c4b0f 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -91,6 +91,14 @@ static int bfin_miiphy_write(const char *devname, uchar addr, uchar reg, ushort
 	return 0;
 }
 
+static struct eth_ops bfin_emac_ops = {
+	.init = bfin_EMAC_init,
+	.halt = bfin_EMAC_halt,
+	.send = bfin_EMAC_send,
+	.recv = bfin_EMAC_recv,
+	.write_hwaddr = bfin_EMAC_setup_addr
+};
+
 int bfin_EMAC_initialize(bd_t *bis)
 {
 	struct eth_device *dev;
@@ -103,11 +111,7 @@ int bfin_EMAC_initialize(bd_t *bis)
 
 	dev->iobase = 0;
 	dev->priv = 0;
-	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;
+	dev->eo = &bfin_emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 09/67] net: calxedaxgmac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (7 preceding siblings ...)
  2012-11-21 13:22   ` [U-Boot] [PATCH v2 08/67] net: bfin_mac: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 10/67] net: cs8900: " Tomas Hlavacek
                     ` (59 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/calxedaxgmac.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 2346feb..3550160 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -508,6 +508,15 @@ static void xgmac_halt(struct eth_device *dev)
 	priv->rx_currdesc = 0;
 }
 
+static struct eth_ops xgmac_ops = {
+	.init = xgmac_init,
+	.send = xgmac_tx,
+	.recv = xgmac_rx,
+	.halt = xgmac_halt
+};
+
+
+
 int calxedaxgmac_initialize(u32 id, ulong base_addr)
 {
 	struct eth_device *dev;
@@ -543,10 +552,7 @@ int calxedaxgmac_initialize(u32 id, ulong base_addr)
 	macaddr[0] = readl(&regs->macaddr[0].lo);
 	memcpy(dev->enetaddr, macaddr, 6);
 
-	dev->eo->init = xgmac_init;
-	dev->eo->send = xgmac_tx;
-	dev->eo->recv = xgmac_rx;
-	dev->eo->halt = xgmac_halt;
+	dev->eo = &xgmac_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 10/67] net: cs8900: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (8 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 09/67] net: calxedaxgmac: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 11/67] net: davinci_emac: " Tomas Hlavacek
                     ` (58 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/cs8900.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 65a4254..a78eada 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -299,6 +299,13 @@ int cs8900_e2prom_write(struct eth_device *dev, u8 addr, u16 value)
 	return 0;
 }
 
+static struct eth_ops cs8900_ops = {
+	.init = cs8900_init,
+	.halt = cs8900_halt,
+	.send = cs8900_send,
+	.recv = cs8900_recv
+};
+
 int cs8900_initialize(u8 dev_num, int base_addr)
 {
 	struct eth_device *dev;
@@ -320,10 +327,7 @@ int cs8900_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	dev->eo->init = cs8900_init;
-	dev->eo->halt = cs8900_halt;
-	dev->eo->send = cs8900_send;
-	dev->eo->recv = cs8900_recv;
+	dev->eo = &cs8900_ops;
 
 	/* Load MAC address from EEPROM */
 	cs8900_get_enetaddr(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 11/67] net: davinci_emac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (9 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 10/67] net: cs8900: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 12/67] net: dc2114x: " Tomas Hlavacek
                     ` (57 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/davinci_emac.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index a221092..5701f75 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -769,6 +769,14 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
 	return (0);
 }
 
+static struct eth_ops davinci_emac_ops = {
+	.init = davinci_eth_open,
+	.halt = davinci_eth_close,
+	.send = davinci_eth_send_packet,
+	.recv = davinci_eth_rcv_packet,
+	.write_hwaddr = davinci_eth_set_mac_addr
+};
+
 /*
  * This function initializes the emac hardware. It does NOT initialize
  * EMAC modules power or pin multiplexors, that is done by board_init()
@@ -791,11 +799,7 @@ int davinci_emac_initialize(void)
 	sprintf(dev->name, "DaVinci-EMAC");
 
 	dev->iobase = 0;
-	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;
+	dev->eo = &davinci_emac_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 12/67] net: dc2114x: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (10 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 11/67] net: davinci_emac: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 13/67] net: designware: " Tomas Hlavacek
                     ` (56 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dc2114x.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 0361699..afdc088 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -207,6 +207,13 @@ static struct pci_device_id supported[] = {
 	{ }
 };
 
+static struct eth_ops dc21x4x_ops = {
+	.init = dc21x4x_init,
+	.halt = dc21x4x_halt,
+	.send = dc21x4x_send,
+	.recv = dc21x4x_recv
+};
+
 int dc21x4x_initialize(bd_t *bis)
 {
 	int			idx=0;
@@ -299,11 +306,8 @@ int dc21x4x_initialize(bd_t *bis)
 #else
 		dev->iobase = pci_mem_to_phys(devbusfn, iobase);
 #endif
-		dev->priv   = (void*) devbusfn;
-		dev->eo->init   = dc21x4x_init;
-		dev->eo->halt   = dc21x4x_halt;
-		dev->eo->send   = dc21x4x_send;
-		dev->eo->recv   = dc21x4x_recv;
+		dev->priv = (void *) devbusfn;
+		dev->eo = &dc21x4x_ops;
 
 		/* Ensure we're not sleeping. */
 		pci_write_config_byte(devbusfn, PCI_CFDA_PSM, WAKEUP);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 13/67] net: designware: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (11 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 12/67] net: dc2114x: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 14/67] net: dnet: " Tomas Hlavacek
                     ` (55 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/designware.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 2d92591..255819e 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -523,6 +523,14 @@ static int dw_mii_write(const char *devname, u8 addr, u8 reg, u16 val)
 }
 #endif
 
+static struct eth_ops dw_eth_ops = {
+	.init = dw_eth_init,
+	.send = dw_eth_send,
+	.recv = dw_eth_recv,
+	.halt = dw_eth_halt,
+	.write_hwaddr = dw_write_hwaddr
+};
+
 int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
 {
 	struct eth_device *dev;
@@ -559,11 +567,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
 	priv->phy_configured = 0;
 	priv->interface = interface;
 
-	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;
+	dev->eo = &dw_eth_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 14/67] net: dnet: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (12 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 13/67] net: designware: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 15/67] net: e1000: " Tomas Hlavacek
                     ` (54 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/dnet.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index be0891f..126828e 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -355,6 +355,13 @@ static void dnet_halt(struct eth_device *netdev)
 	dnet_writew_mac(dnet, DNET_INTERNAL_MODE_REG, 0);
 }
 
+static struct eth_ops dnet_ops = {
+	.init = dnet_init,
+	.halt = dnet_halt,
+	.send = dnet_send,
+	.recv = dnet_recv
+};
+
 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
 {
 	struct dnet_device *dnet;
@@ -374,10 +381,7 @@ int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	dnet->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "dnet%d", id);
-	netdev->eo->init = dnet_init;
-	netdev->eo->halt = dnet_halt;
-	netdev->eo->send = dnet_send;
-	netdev->eo->recv = dnet_recv;
+	netdev->eo = &dnet_ops;
 
 	dev_capa = readl(&dnet->regs->VERCAPS) & 0xFFFF;
 	debug("%s: has %smdio, %sirq, %sgigabit, %sdma\n", netdev->name,
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 15/67] net: e1000: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (13 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 14/67] net: dnet: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 16/67] net: eepro100: " Tomas Hlavacek
                     ` (53 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/e1000.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index c9f9fb3..82e89d8 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -5118,6 +5118,13 @@ void e1000_get_bus_type(struct e1000_hw *hw)
 /* A list of all registered e1000 devices */
 static LIST_HEAD(e1000_hw_list);
 
+static struct eth_ops e1000_ops = {
+	.init = e1000_init,
+	.recv = e1000_poll,
+	.send = e1000_transmit,
+	.halt = e1000_disable
+};
+
 /**************************************************************************
 PROBE - Look for an adapter, this routine's visible to the outside
 You should omit the last argument struct pci_device * for a non-PCI NIC
@@ -5218,10 +5225,7 @@ e1000_initialize(bd_t * bis)
 		       nic->enetaddr[3], nic->enetaddr[4], nic->enetaddr[5]);
 
 		/* Set up the function pointers and register the device */
-		nic->eo->init = e1000_init;
-		nic->eo->recv = e1000_poll;
-		nic->eo->send = e1000_transmit;
-		nic->eo->halt = e1000_disable;
+		nic->eo = &e1000_ops;
 		eth_register(nic);
 	}
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 16/67] net: eepro100: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (14 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 15/67] net: e1000: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 17/67] net: enc28j60: " Tomas Hlavacek
                     ` (52 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/eepro100.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index e3aa720..91d7f0b 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -408,6 +408,13 @@ static struct pci_device_id supported[] = {
 	{}
 };
 
+static struct eth_ops eepro100_ops = {
+	.init = eepro100_init,
+	.halt = eepro100_halt,
+	.send = eepro100_send,
+	.recv = eepro100_recv
+};
+
 int eepro100_initialize (bd_t * bis)
 {
 	pci_dev_t devno;
@@ -458,10 +465,7 @@ 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->eo->init = eepro100_init;
-		dev->eo->halt = eepro100_halt;
-		dev->eo->send = eepro100_send;
-		dev->eo->recv = eepro100_recv;
+		dev->eo = &eepro100_ops;
 
 		eth_register (dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 17/67] net: enc28j60: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (15 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 16/67] net: eepro100: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 18/67] net: ep93xx_eth: " Tomas Hlavacek
                     ` (51 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/enc28j60.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index 95f0b93..cde4e1a 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -924,6 +924,14 @@ static void enc_halt(struct eth_device *dev)
 	enc_release_bus(enc);
 }
 
+static struct eth_ops enc28j60_ops = {
+	.init = enc_init,
+	.halt = enc_halt,
+	.send = enc_send,
+	.recv = enc_recv,
+	.write_hwaddr = enc_write_hwaddr
+};
+
 /*
  * This is the only exported function.
  *
@@ -962,11 +970,7 @@ int enc28j60_initialize(unsigned int bus, unsigned int cs,
 	enc->dev = dev;
 	/* now fill the eth_device object */
 	dev->priv = enc;
-	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;
+	dev->eo = &enc28j60_ops;
 	sprintf(dev->name, "enc%i.%i", bus, cs);
 	eth_register(dev);
 #if defined(CONFIG_CMD_MII)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 18/67] net: ep93xx_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (16 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 17/67] net: enc28j60: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 19/67] net: ethoc: " Tomas Hlavacek
                     ` (50 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ep93xx_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 0b5cb3c..a2a1502 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -439,6 +439,13 @@ int ep93xx_miiphy_initialize(bd_t * const bd)
 }
 #endif
 
+static struct eth_dev ep93xx_eth_ops = {
+	.init = ep93xx_eth_open,
+	.halt = ep93xx_eth_close,
+	.send = ep93xx_eth_send_packet,
+	.recv = ep93xx_eth_rcv_packet
+};
+
 /**
  * Initialize the EP93xx MAC.  The MAC hardware is reset.  Buffers are
  * allocated, if necessary, for the TX and RX descriptor and status queues,
@@ -499,10 +506,7 @@ int ep93xx_eth_initialize(u8 dev_num, int base_addr)
 
 	dev->iobase = base_addr;
 	dev->priv = priv;
-	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;
+	dev->eo = &ep93xx_eth_ops;
 
 	sprintf(dev->name, "ep93xx_eth-%hu", dev_num);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 19/67] net: ethoc: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (17 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 18/67] net: ep93xx_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 20/67] net: fec_mxc: " Tomas Hlavacek
                     ` (49 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ethoc.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 946b8e2..6a78605 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -482,6 +482,14 @@ static int ethoc_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops ethoc_ops = {
+	.init = ethoc_init,
+	.halt = ethoc_halt,
+	.send = ethoc_send,
+	.recv = ethoc_recv,
+	.write_hwaddr = ethoc_set_mac_address
+};
+
 int ethoc_initialize(u8 dev_num, int base_addr)
 {
 	struct ethoc *priv;
@@ -499,11 +507,7 @@ int ethoc_initialize(u8 dev_num, int base_addr)
 	memset(dev, 0, sizeof(*dev));
 	dev->priv = priv;
 	dev->iobase = base_addr;
-	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;
+	dev->eo = &ethoc_ops;
 	sprintf(dev->name, "%s-%hu", "ETHOC", dev_num);
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 20/67] net: fec_mxc: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (18 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 19/67] net: ethoc: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 21/67] net: ftgmac100: " Tomas Hlavacek
                     ` (48 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/fec_mxc.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index f8a5556..3259f07 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -915,6 +915,15 @@ static int fec_recv(struct eth_device *dev)
 	return len;
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.send = fec_send,
+	.recv = fec_recv,
+	.halt = fec_halt,
+	.write_hwaddr = fec_set_hwaddr
+};
+
+
 static int fec_probe(bd_t *bd, int dev_id, int phy_id, uint32_t base_addr)
 {
 	struct eth_device *edev;
@@ -943,11 +952,7 @@ 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->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;
+	edev->eo = &fec_ops;
 
 	fec->eth = (struct ethernet_regs *)base_addr;
 	fec->bd = bd;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 21/67] net: ftgmac100: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (19 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 20/67] net: fec_mxc: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 22/67] net: greth.c: " Tomas Hlavacek
                     ` (47 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ftgmac100.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 76391c1..7046829 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -525,6 +525,13 @@ static int ftgmac100_send(struct eth_device *dev, void *packet, int length)
 	return 0;
 }
 
+static struct eth_ops ftgmac100_ops = {
+	.init = ftgmac100_init,
+	.halt = ftgmac100_halt,
+	.send = ftgmac100_send,
+	.recv = ftgmac100_recv
+};
+
 int ftgmac100_initialize(bd_t *bd)
 {
 	struct eth_device *dev;
@@ -548,10 +555,7 @@ int ftgmac100_initialize(bd_t *bd)
 
 	sprintf(dev->name, "FTGMAC100");
 	dev->iobase	= CONFIG_FTGMAC100_BASE;
-	dev->eo->init	= ftgmac100_init;
-	dev->eo->halt	= ftgmac100_halt;
-	dev->eo->send	= ftgmac100_send;
-	dev->eo->recv	= ftgmac100_recv;
+	dev->eo		= &ftgmac100_ops;
 	dev->priv	= priv;
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 22/67] net: greth.c: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (20 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 21/67] net: ftgmac100: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 23/67] net: fsl_mcdmafec: " Tomas Hlavacek
                     ` (46 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/greth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 150dccf..3794005 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -597,6 +597,13 @@ void greth_set_hwaddr(greth_priv * greth, unsigned char *mac)
 	       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
 
+static struct eth_ops greth_ops = {
+	.init = greth_init,
+	.halt = greth_halt,
+	.send = greth_send,
+	.recv = greth_recv
+};
+
 int greth_initialize(bd_t * bis)
 {
 	greth_priv *greth;
@@ -623,10 +630,7 @@ 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->eo->init = greth_init;
-	dev->eo->halt = greth_halt;
-	dev->eo->send = greth_send;
-	dev->eo->recv = greth_recv;
+	dev->eo = &greth_ops;
 	greth->dev = dev;
 
 	/* Reset Core */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 23/67] net: fsl_mcdmafec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (21 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 22/67] net: greth.c: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 24/67] net: inca-ip_sw: " Tomas Hlavacek
                     ` (45 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/fsl_mcdmafec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 2e70d22..6a18809 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -512,6 +512,13 @@ static void fec_halt(struct eth_device *dev)
 #endif
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int mcdmafec_initialize(bd_t * bis)
 {
 	struct eth_device *dev;
@@ -533,10 +540,7 @@ int mcdmafec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_DMA_USE_INTSRAM
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 24/67] net: inca-ip_sw: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (22 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 23/67] net: fsl_mcdmafec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 25/67] net: ks8695eth: " Tomas Hlavacek
                     ` (44 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/inca-ip_sw.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index 216122d..ab91553 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -165,6 +165,12 @@ static void inca_init_switch_chip(void);
 static void inca_dma_init(void);
 static int inca_amdix(void);
 
+static struct eth_ops inca_switch_ops = {
+	.init = inca_switch_init,
+	.halt = inca_switch_halt,
+	.send = inca_switch_send,
+	.recv = inca_switch_recv
+};
 
 int inca_switch_initialize(bd_t * bis)
 {
@@ -189,10 +195,7 @@ int inca_switch_initialize(bd_t * bis)
 #endif
 
 	sprintf(dev->name, "INCA-IP Switch");
-	dev->eo->init = inca_switch_init;
-	dev->eo->halt = inca_switch_halt;
-	dev->eo->send = inca_switch_send;
-	dev->eo->recv = inca_switch_recv;
+	dev->eo = &inca_switch_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 25/67] net: ks8695eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (23 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 24/67] net: inca-ip_sw: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 26/67] net: lan91c96: " Tomas Hlavacek
                     ` (43 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ks8695eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c
index b0703ef..4a5a27e 100644
--- a/drivers/net/ks8695eth.c
+++ b/drivers/net/ks8695eth.c
@@ -220,6 +220,13 @@ static int ks8695_eth_send(struct eth_device *dev, void *packet, int len)
 
 /****************************************************************************/
 
+static struct eth_ops ks8695_eth_ops = {
+	.init = ks8695_eth_init,
+	.halt = ks8695_eth_halt,
+	.send = ks8695_eth_send,
+	.recv = ks8695_eth_recv
+};
+
 int ks8695_eth_initialize(void)
 {
 	struct eth_device *dev;
@@ -230,10 +237,7 @@ int ks8695_eth_initialize(void)
 	memset(dev, 0, sizeof(*dev));
 
 	dev->iobase = KS8695_IO_BASE + KS8695_LAN_DMA_TX;
-	dev->eo->init = ks8695_eth_init;
-	dev->eo->halt = ks8695_eth_halt;
-	dev->eo->send = ks8695_eth_send;
-	dev->eo->recv = ks8695_eth_recv;
+	dev->eo = &ks8695_eth_ops;
 	strcpy(dev->name, "ks8695eth");
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 26/67] net: lan91c96: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (24 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 25/67] net: ks8695eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 27/67] net: macb: " Tomas Hlavacek
                     ` (42 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/lan91c96.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index d87302b..4e4e2e4 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -785,6 +785,13 @@ static int lan91c96_detect_chip(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops lan91c96_ops = {
+	.init = lan91c96_init,
+	.halt = lan91c96_halt,
+	.send = lan91c96_send,
+	.recv = lan91c96_recv
+};
+
 int lan91c96_initialize(u8 dev_num, int base_addr)
 {
 	struct eth_device *dev;
@@ -806,10 +813,7 @@ int lan91c96_initialize(u8 dev_num, int base_addr)
 	}
 	get_rom_mac(dev, dev->enetaddr);
 
-	dev->eo->init = lan91c96_init;
-	dev->eo->halt = lan91c96_halt;
-	dev->eo->send = lan91c96_send;
-	dev->eo->recv = lan91c96_recv;
+	dev->eo = &lan91c96_ops;
 	sprintf(dev->name, "%s-%hu", supported_chips[r].name, dev_num);
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 27/67] net: macb: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (25 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 26/67] net: lan91c96: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 28/67] net: mcffec: " Tomas Hlavacek
                     ` (41 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/macb.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 2c53902..c0f1202 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -529,6 +529,14 @@ static int macb_write_hwaddr(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops macb_ops = {
+	.init = macb_init,
+	.halt = macb_halt,
+	.send = macb_send,
+	.recv = macb_recv,
+	.write_hwaddr = macb_write_hwaddr
+};
+
 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 {
 	struct macb_device *macb;
@@ -558,11 +566,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	macb->phy_addr = phy_addr;
 
 	sprintf(netdev->name, "macb%d", id);
-	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;
+	netdev->eo = &macb_ops;
 
 	/*
 	 * Do some basic initialization so that we at least can talk
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 28/67] net: mcffec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (26 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 27/67] net: macb: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 29/67] net: mpc5xxx_fec: " Tomas Hlavacek
                     ` (40 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mcffec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 0aeb24e..31c8dcd 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -551,6 +551,13 @@ void fec_halt(struct eth_device *dev)
 	memset(info->txbuf, 0, DBUF_LENGTH);
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int mcffec_initialize(bd_t * bis)
 {
 	struct eth_device *dev;
@@ -572,10 +579,7 @@ int mcffec_initialize(bd_t * bis)
 		sprintf(dev->name, "FEC%d", fec_info[i].index);
 
 		dev->priv = &fec_info[i];
-		dev->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		/* setup Receive and Transmit buffer descriptor */
 #ifdef CONFIG_SYS_FEC_BUF_USE_SRAM
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 29/67] net: mpc5xxx_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (27 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 28/67] net: mcffec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 30/67] net: mvgbe: " Tomas Hlavacek
                     ` (39 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mpc5xxx_fec.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index 73503da..50f8100 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -879,6 +879,12 @@ static int mpc5xxx_fec_recv(struct eth_device *dev)
 	return len;
 }
 
+static struct eth_ops mpc5xxx_fec_ops = {
+	.init = mpc5xxx_fec_init,
+	.halt = mpc5xxx_fec_halt,
+	.send = mpc5xxx_fec_send,
+	.recv = mpc5xxx_fec_recv
+};
 
 /********************************************************************/
 int mpc5xxx_fec_initialize(bd_t * bis)
@@ -915,10 +921,7 @@ int mpc5xxx_fec_initialize(bd_t * bis)
 
 	dev->priv = (void *)fec;
 	dev->iobase = MPC5XXX_FEC;
-	dev->eo->init = mpc5xxx_fec_init;
-	dev->eo->halt = mpc5xxx_fec_halt;
-	dev->eo->send = mpc5xxx_fec_send;
-	dev->eo->recv = mpc5xxx_fec_recv;
+	dev->eo = &mpc5xxx_fec_ops;
 
 	sprintf(dev->name, "FEC");
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 30/67] net: mvgbe: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (28 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 29/67] net: mpc5xxx_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 31/67] net: mpc512x_fec: " Tomas Hlavacek
                     ` (38 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mvgbe.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 6ddb6d6..eeb0741 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -647,6 +647,14 @@ static int mvgbe_recv(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops mvgbe_ops = {
+	.init = (int (*) (struct eth_device *, bd_t *))mvgbe_init,
+	.halt = (void (*) (struct eth_device *))mvgbe_halt,
+	.send = mvgbe_send,
+	.recv = mvgbe_recv,
+	.write_hwaddr = mvgbe_write_hwaddr
+};
+
 int mvgbe_initialize(bd_t *bis)
 {
 	struct mvgbe_device *dmvgbe;
@@ -721,11 +729,7 @@ error1:
 			return -1;
 		}
 
-		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;
+		dev->eo = &mvgbe_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 31/67] net: mpc512x_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (29 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 30/67] net: mvgbe: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 32/67] net: natsemi: " Tomas Hlavacek
                     ` (37 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/mpc512x_fec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c
index 4aa3b28..d10a70a 100644
--- a/drivers/net/mpc512x_fec.c
+++ b/drivers/net/mpc512x_fec.c
@@ -608,6 +608,13 @@ static int mpc512x_fec_recv (struct eth_device *dev)
 	return frame_length;
 }
 
+static struct eth_ops mpc512x_fec_ops = {
+	.init = mpc512x_fec_init,
+	.halt = mpc512x_fec_halt,
+	.send = mpc512x_fec_send,
+	.recv = mpc512x_fec_recv
+};
+
 /********************************************************************/
 int mpc512x_fec_initialize (bd_t * bis)
 {
@@ -629,10 +636,7 @@ int mpc512x_fec_initialize (bd_t * bis)
 # endif
 	dev->priv = (void *)fec;
 	dev->iobase = (int)&im->fec;
-	dev->eo->init = mpc512x_fec_init;
-	dev->eo->halt = mpc512x_fec_halt;
-	dev->eo->send = mpc512x_fec_send;
-	dev->eo->recv = mpc512x_fec_recv;
+	dev->eo = &mpc512x_fec_ops;
 
 	sprintf (dev->name, "FEC");
 	eth_register (dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 32/67] net: natsemi: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (30 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 31/67] net: mpc512x_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 33/67] net: ne2000: " Tomas Hlavacek
                     ` (36 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/natsemi.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 4288d1f..a3d78b9 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -273,6 +273,13 @@ OUTL(struct eth_device *dev, int command, u_long addr)
 	*(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command);
 }
 
+static struct eth_ops natsemi_ops = {
+	.init = natsemi_init,
+	.halt = natsemi_disable,
+	.send = natsemi_send,
+	.recv = natsemi_poll
+};
+
 /*
  * Function: natsemi_initialize
  *
@@ -332,10 +339,7 @@ natsemi_initialize(bd_t * bis)
 		printf("natsemi: NatSemi ns8381[56] @ %#x\n", dev->iobase);
 #endif
 		dev->priv = (void *) devno;
-		dev->eo->init = natsemi_init;
-		dev->eo->halt = natsemi_disable;
-		dev->eo->send = natsemi_send;
-		dev->eo->recv = natsemi_poll;
+		dev->eo = &natsemi_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 33/67] net: ne2000: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (31 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 32/67] net: natsemi: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 34/67] net: npe: " Tomas Hlavacek
                     ` (35 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ne2000_base.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 2cc9743..f1fed0e 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -774,6 +774,13 @@ static int ne2k_send(struct eth_device *dev, void *packet, int length)
 	return 0;
 }
 
+static struct eth_ops ne2k_ops = {
+	.init = ne2k_init,
+	.halt = ne2k_halt,
+	.send = ne2k_send,
+	.recv = ne2k_recv
+};
+
 /**
  * Setup the driver for use and register it with the eth layer
  * @return 0 on success, -1 on error (causing caller to print error msg)
@@ -789,10 +796,7 @@ int ne2k_register(void)
 	if (ne2k_setup_driver(dev))
 		return -1;
 
-	dev->eo->init = ne2k_init;
-	dev->eo->halt = ne2k_halt;
-	dev->eo->send = ne2k_send;
-	dev->eo->recv = ne2k_recv;
+	dev->eo = &ne2k_ops;
 
 	sprintf(dev->name, "NE2000");
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 34/67] net: npe: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (32 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 33/67] net: ne2000: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 35/67] net: ns8382x: " Tomas Hlavacek
                     ` (34 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/npe/npe.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/npe/npe.c b/drivers/net/npe/npe.c
index d376c21..adff561 100644
--- a/drivers/net/npe/npe.c
+++ b/drivers/net/npe/npe.c
@@ -576,6 +576,13 @@ static int npe_rx(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops npe_ops = {
+	.init = npe_init,
+	.halt = npe_halt,
+	.send = npe_send,
+	.recv = npe_rx
+};
+
 int npe_initialize(bd_t * bis)
 {
 	static int virgin = 0;
@@ -625,10 +632,7 @@ int npe_initialize(bd_t * bis)
 
 		sprintf(dev->name, "NPE%d", eth_num);
 		dev->priv = (void *)p_npe;
-		dev->eo->init = npe_init;
-		dev->eo->halt = npe_halt;
-		dev->eo->send = npe_send;
-		dev->eo->recv = npe_rx;
+		dev->eo = &npe_ops;
 
 		p_npe->print_speed = 1;
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 35/67] net: ns8382x: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (33 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 34/67] net: npe: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 36/67] net: pcnet: " Tomas Hlavacek
                     ` (33 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ns8382x.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index 8b08e0b..c433d3a 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -294,6 +294,14 @@ OUTL(struct eth_device *dev, int command, u_long addr)
 	*(vu_long *) ((addr + dev->iobase)) = cpu_to_le32(command);
 }
 
+static struct eth_ops ns8382x_ops = {
+	.init = ns8382x_init,
+	.halt = ns8382x_disable,
+	.send = ns8382x_send,
+	.recv = ns8382x_poll
+};
+
+
 /* Function: ns8382x_initialize
  * Description: Retrieves the MAC address of the card, and sets up some
  *  globals required by other routines, and initializes the NIC, making it
@@ -346,10 +354,7 @@ ns8382x_initialize(bd_t * bis)
 		sprintf(dev->name, "dp8382x#%d", card_number);
 		dev->iobase = bus_to_phys(iobase);
 		dev->priv = (void *) devno;
-		dev->eo->init = ns8382x_init;
-		dev->eo->halt = ns8382x_disable;
-		dev->eo->send = ns8382x_send;
-		dev->eo->recv = ns8382x_poll;
+		dev->eo = &ns8382x_ops;
 
 		/* ns8382x has a non-standard PM control register
 		 * in PCI config space.  Some boards apparently need
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 36/67] net: pcnet: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (34 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 35/67] net: ns8382x: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 37/67] net: plb2800_eth: " Tomas Hlavacek
                     ` (32 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/pcnet.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index 35254c3..8bb8c67 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -154,6 +154,12 @@ static struct pci_device_id supported[] = {
 	{}
 };
 
+static struct eth_ops pcnet_ops = {
+	.init = pcnet_init,
+	.halt = pcnet_halt,
+	.send = pcnet_send,
+	.recv = pcnet_recv
+};
 
 int pcnet_initialize (bd_t * bis)
 {
@@ -216,12 +222,9 @@ int pcnet_initialize (bd_t * bis)
 		}
 
 		/*
-		 * Setup device structure and register the driver.
+		 * Setup device ops and register the driver.
 		 */
-		dev->eo->init = pcnet_init;
-		dev->eo->halt = pcnet_halt;
-		dev->eo->send = pcnet_send;
-		dev->eo->recv = pcnet_recv;
+		dev->eo = &pcnet_ops;
 
 		eth_register (dev);
 	}
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 37/67] net: plb2800_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (35 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 36/67] net: pcnet: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 38/67] net: rtl8139: " Tomas Hlavacek
                     ` (31 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/plb2800_eth.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index d3eb692..3b5861f 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -92,6 +92,12 @@ static unsigned char * plb2800_get_mac_addr(void);
 static int rx_new;
 static int mac_addr_set = 0;
 
+static struct eth_ops plb2800_eth_ops = {
+	.init = plb2800_eth_init,
+	.halt = plb2800_eth_halt,
+	.send = plb2800_eth_send,
+	.recv = plb2800_eth_recv
+};
 
 int plb2800_eth_initialize(bd_t * bis)
 {
@@ -110,10 +116,7 @@ int plb2800_eth_initialize(bd_t * bis)
 	memset(dev, 0, sizeof(*dev));
 
 	sprintf(dev->name, "PLB2800 Switch");
-	dev->eo->init = plb2800_eth_init;
-	dev->eo->halt = plb2800_eth_halt;
-	dev->eo->send = plb2800_eth_send;
-	dev->eo->recv = plb2800_eth_recv;
+	dev->eo = &plb2800_eth_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 38/67] net: rtl8139: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (36 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 37/67] net: plb2800_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 39/67] net: rtl8169: " Tomas Hlavacek
                     ` (30 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/rtl8139.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index ed02cf6..0e4e5d5 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -200,6 +200,16 @@ static struct pci_device_id supported[] = {
        {}
 };
 
+static struct eth_ops rtl8139_ops = {
+	.init = rtl8139_probe,
+	.halt = rtl_disable,
+	.send = rtl_transmit,
+	.recv = rtl_poll,
+#ifdef CONFIG_MCAST_TFTP
+	.mcast = rtl_bcast_addr
+#endif
+};
+
 int rtl8139_initialize(bd_t *bis)
 {
 	pci_dev_t devno;
@@ -229,13 +239,7 @@ int rtl8139_initialize(bd_t *bis)
 
 		dev->priv = (void *) devno;
 		dev->iobase = (int)bus_to_phys(iobase);
-		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->eo->mcast = rtl_bcast_addr;
-#endif
+		dev->eo = &rtl8139_ops;
 
 		eth_register (dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 39/67] net: rtl8169: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (37 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 38/67] net: rtl8139: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 40/67] net: smc91111: " Tomas Hlavacek
                     ` (29 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/rtl8169.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c75fd4f..80f8443 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -872,6 +872,14 @@ static int rtl_init(struct eth_device *dev, bd_t *bis)
 	return 1;
 }
 
+static struct eth_ops rtl_ops = {
+	.init = rtl_reset,
+	.halt = rtl_halt,
+	.send = rtl_send,
+	.recv = rtl_recv
+};
+
+
 int rtl8169_initialize(bd_t *bis)
 {
 	pci_dev_t devno;
@@ -902,10 +910,7 @@ int rtl8169_initialize(bd_t *bis)
 		dev->priv = (void *) devno;
 		dev->iobase = (int)pci_mem_to_phys(devno, iobase);
 
-		dev->eo->init = rtl_reset;
-		dev->eo->halt = rtl_halt;
-		dev->eo->send = rtl_send;
-		dev->eo->recv = rtl_recv;
+		dev->eo = &rtl_ops;
 
 		eth_register (dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 40/67] net: smc91111: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (38 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 39/67] net: rtl8169: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 41/67] net: smc911x: " Tomas Hlavacek
                     ` (28 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/smc91111.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 3ea7213..f237ef8 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -1331,6 +1331,14 @@ static void print_packet( byte * buf, int length )
 }
 #endif
 
+static struct eth_ops smc_ops = {
+	.init = smc_init,
+	.halt = smc_halt,
+	.send = smc_send,
+	.recv = smc_rcv,
+	.write_hwaddr = smc_write_hwaddr
+};
+
 int smc91111_initialize(u8 dev_num, int base_addr)
 {
 	struct smc91111_priv *priv;
@@ -1357,11 +1365,7 @@ int smc91111_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[i] = SMC_inb(dev, (ADDR0_REG + i));
 	swap_to(FLASH);
 
-	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;
+	dev->eo = &smc_ops;
 	sprintf(dev->name, "%s-%hu", SMC_DEV_NAME, dev_num);
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 41/67] net: smc911x: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (39 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 40/67] net: smc91111: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 42/67] net: tsec: " Tomas Hlavacek
                     ` (27 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/smc911x.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5ba1bdf..0369376 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -251,6 +251,13 @@ static int smc911x_miiphy_write(const char *devname, u8 phy, u8 reg, u16 val)
 }
 #endif
 
+static struct eth_ops smc911x_ops = {
+	.init = smc911x_init,
+	.halt = smc911x_halt,
+	.send = smc911x_send,
+	.recv = smc911x_rx
+};
+
 int smc911x_initialize(u8 dev_num, int base_addr)
 {
 	unsigned long addrl, addrh;
@@ -282,10 +289,7 @@ int smc911x_initialize(u8 dev_num, int base_addr)
 		dev->enetaddr[5] = addrh >> 8;
 	}
 
-	dev->eo->init = smc911x_init;
-	dev->eo->halt = smc911x_halt;
-	dev->eo->send = smc911x_send;
-	dev->eo->recv = smc911x_rx;
+	dev->eo = &smc911x_ops;
 	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 42/67] net: tsec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (40 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 41/67] net: smc911x: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 43/67] net: tsi108_eth: " Tomas Hlavacek
                     ` (26 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/tsec.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 345d563..034f0ed 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -605,6 +605,16 @@ static int init_phy(struct eth_device *dev)
 	return 1;
 }
 
+static struct eth_ops tsec_ops = {
+	.init = tsec_init,
+	.halt = tsec_halt,
+	.send = tsec_send,
+	.recv = tsec_recv,
+#ifdef CONFIG_MCAST_TFTP
+	.mcast = tsec_mcast_addr
+#endif
+};
+
 /* Initialize device structure. Returns success if PHY
  * initialization succeeded (i.e. if it recognizes the PHY)
  */
@@ -638,13 +648,7 @@ 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->eo->init = tsec_init;
-	dev->eo->halt = tsec_halt;
-	dev->eo->send = tsec_send;
-	dev->eo->recv = tsec_recv;
-#ifdef CONFIG_MCAST_TFTP
-	dev->eo->mcast = tsec_mcast_addr;
-#endif
+	dev->eo = &tsec_ops;
 
 	/* Tell u-boot to get the addr from the env */
 	for (i = 0; i < 6; i++)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 43/67] net: tsi108_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (41 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 42/67] net: tsec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 44/67] net: uli526x: " Tomas Hlavacek
                     ` (25 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/tsi108_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index bed09d5..ea26c2c 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -718,6 +718,13 @@ static int marvell_88e_phy_config (struct eth_device *dev, int *speed,
 	return 1;
 }
 
+static struct eth_ops tsi108_eth_ops = {
+	.init = tsi108_eth_probe,
+	.halt = tsi108_eth_halt,
+	.send = tsi108_eth_send,
+	.recv = tsi108_eth_recv
+};
+
 /*
  * External interface
  *
@@ -739,10 +746,7 @@ int tsi108_eth_initialize (bd_t * bis)
 
 		dev->iobase = ETH_BASE + (index * ETH_PORT_OFFSET);
 		dev->priv = (void *)(phy_address[index]);
-		dev->eo->init = tsi108_eth_probe;
-		dev->eo->halt = tsi108_eth_halt;
-		dev->eo->send = tsi108_eth_send;
-		dev->eo->recv = tsi108_eth_recv;
+		dev->eo = &tsi108_eth_ops;
 
 		eth_register(dev);
 	}
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 44/67] net: uli526x: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (42 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 43/67] net: tsi108_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 45/67] net: xilinx_axi_emac: " Tomas Hlavacek
                     ` (24 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/uli526x.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 33d8b49..65670db 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -198,6 +198,13 @@ static struct pci_device_id uli526x_pci_tbl[] = {
 	{}
 };
 
+static struct eth_ops uli526x_ops = {
+	.init = uli526x_init_one,
+	.halt = uli526x_disable,
+	.send = uli526x_start_xmit,
+	.recv = uli526x_rx_packet
+};
+
 /* ULI526X network board routine */
 
 /*
@@ -237,10 +244,7 @@ int uli526x_initialize(bd_t *bis)
 		db->pdev = devno;
 		dev->iobase = iobase;
 
-		dev->eo->init = uli526x_init_one;
-		dev->eo->halt = uli526x_disable;
-		dev->eo->send = uli526x_start_xmit;
-		dev->eo->recv = uli526x_rx_packet;
+		dev->eo = &uli526x_ops;
 
 		/* init db */
 		db->ioaddr = dev->iobase;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 45/67] net: xilinx_axi_emac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (43 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 44/67] net: uli526x: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 46/67] net: xilinx_emaclite: " Tomas Hlavacek
                     ` (23 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_axi_emac.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 54a871b..44ece48 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -622,6 +622,15 @@ static int axiemac_bus_reset(struct mii_dev *bus)
 	return 0;
 }
 
+static struct eth_ops axiemac_ops = {
+	.init = axiemac_init,
+	.halt = axiemac_halt,
+	.send = axiemac_send,
+	.recv = axiemac_recv,
+	.write_hwaddr = axiemac_setup_mac
+};
+
+
 int xilinx_axiemac_initialize(bd_t *bis, unsigned long base_addr,
 							unsigned long dma_addr)
 {
@@ -645,11 +654,7 @@ 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->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;
+	dev->eo = &axiemac_ops;
 
 #ifdef CONFIG_PHY_ADDR
 	priv->phyaddr = CONFIG_PHY_ADDR;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 46/67] net: xilinx_emaclite: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (44 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 45/67] net: xilinx_axi_emac: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 47/67] net: zynq_gem: " Tomas Hlavacek
                     ` (22 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_emaclite.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index c0fefa7..b5be0a3 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -345,6 +345,13 @@ static int emaclite_recv(struct eth_device *dev)
 
 }
 
+static struct eth_ops emaclite_ops = {
+	init = emaclite_init,
+	halt = emaclite_halt,
+	send = emaclite_send,
+	recv = emaclite_recv
+};
+
 int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
 							int txpp, int rxpp)
 {
@@ -369,10 +376,7 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
 	sprintf(dev->name, "Xelite.%lx", base_addr);
 
 	dev->iobase = base_addr;
-	dev->eo->init = emaclite_init;
-	dev->eo->halt = emaclite_halt;
-	dev->eo->send = emaclite_send;
-	dev->eo->recv = emaclite_recv;
+	dev->eo = &emaclite_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 47/67] net: zynq_gem: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (45 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 46/67] net: xilinx_emaclite: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 48/67] net: xilinx_ll_temac: " Tomas Hlavacek
                     ` (21 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/zynq_gem.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 3cba176..0a9a0f0 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -399,6 +399,14 @@ static int zynq_gem_miiphy_write(const char *devname, uchar addr,
 	return phywrite(dev, addr, reg, val);
 }
 
+static struct eth_ops zynq_gem_ops = {
+	.init = zynq_gem_init,
+	.halt = zynq_gem_halt,
+	.send = zynq_gem_send,
+	.recv = zynq_gem_recv,
+	.write_hwaddr = zynq_gem_setup_mac
+};
+
 int zynq_gem_initialize(bd_t *bis, int base_addr)
 {
 	struct eth_device *dev;
@@ -425,11 +433,7 @@ int zynq_gem_initialize(bd_t *bis, int base_addr)
 
 	dev->iobase = base_addr;
 
-	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;
+	dev->eo = &zynq_gem_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 48/67] net: xilinx_ll_temac: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (46 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 47/67] net: zynq_gem: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 49/67] net: sh_eth: " Tomas Hlavacek
                     ` (20 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/xilinx_ll_temac.c |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
index 8f67417..5f52251 100644
--- a/drivers/net/xilinx_ll_temac.c
+++ b/drivers/net/xilinx_ll_temac.c
@@ -282,6 +282,24 @@ static int ll_temac_phy_init(struct eth_device *dev)
 	return 1;
 }
 
+static struct eth_ops ll_temac_ops_sdma = {
+	.init = ll_temac_init,
+	.halt = ll_temac_halt,
+	.write_hwaddr = ll_temac_setup_mac_addr,
+	.recv = ll_temac_recv_sdma,
+	.send = ll_temac_send_sdma
+};
+
+static struct eth_ops ll_temac_ops_fifo = {
+	.init = ll_temac_init,
+	.halt = ll_temac_halt,
+	.write_hwaddr = ll_temac_setup_mac_addr,
+	.recv = ll_temac_recv_fifo,
+	.send = ll_temac_send_fifo
+};
+
+
+
 /*
  * Initialize a single ll_temac devices
  *
@@ -313,9 +331,6 @@ int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
 	dev->iobase = devinf->base_addr;
 
 	dev->priv = ll_temac;
-	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 +349,14 @@ 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->eo->recv = ll_temac_recv_sdma;
-		dev->eo->send = ll_temac_send_sdma;
+		dev->eo = &ll_temac_ops_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->eo->recv = ll_temac_recv_fifo;
-		dev->eo->send = ll_temac_send_fifo;
+		dev->eo = &ll_temac_ops_fifo;
 	}
 
 	/* Link to specified MDIO bus */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 49/67] net: sh_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (47 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 48/67] net: xilinx_ll_temac: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 50/67] net: au1x00_eth: " Tomas Hlavacek
                     ` (19 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/sh_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 1f8d0c1..e801bcb 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -502,6 +502,13 @@ void sh_eth_halt(struct eth_device *dev)
 	sh_eth_stop(eth);
 }
 
+static struct eth_ops sh_eth_ops = {
+	.init = sh_eth_init,
+	.halt = sh_eth_halt,
+	.send = sh_eth_send,
+	.recv = sh_eth_recv
+};
+
 int sh_eth_initialize(bd_t *bd)
 {
     int ret = 0;
@@ -529,10 +536,7 @@ int sh_eth_initialize(bd_t *bd)
 
     dev->priv = (void *)eth;
     dev->iobase = 0;
-	dev->eo->init = sh_eth_init;
-	dev->eo->halt = sh_eth_halt;
-	dev->eo->send = sh_eth_send;
-	dev->eo->recv = sh_eth_recv;
+	dev->eo = &sh_eth_ops;
     eth->port_info[eth->port].dev = dev;
 
 	sprintf(dev->name, SHETHER_NAME);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 50/67] net: au1x00_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (48 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 49/67] net: sh_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 51/67] net: mpc8220_fec: " Tomas Hlavacek
                     ` (18 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/mips/cpu/mips32/au1x00/au1x00_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
index 2909fb3..cd4c518 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_eth.c
@@ -283,6 +283,13 @@ static void au1x00_halt(struct eth_device* dev){
 	*macen = 0;
 }
 
+static struct eth_ops au1x00_ops = {
+	.init = au1x00_init,
+	.halt = au1x00_halt,
+	.send = au1x00_send,
+	.recv = au1x00_recv
+};
+
 int au1x00_enet_initialize(bd_t *bis){
 	struct eth_device* dev;
 
@@ -296,10 +303,7 @@ int au1x00_enet_initialize(bd_t *bis){
 	sprintf(dev->name, "Au1X00 ethernet");
 	dev->iobase = 0;
 	dev->priv = 0;
-	dev->eo->init = au1x00_init;
-	dev->eo->halt = au1x00_halt;
-	dev->eo->send = au1x00_send;
-	dev->eo->recv = au1x00_recv;
+	dev->eo = &au1x00_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 51/67] net: mpc8220_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (49 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 50/67] net: au1x00_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 52/67] net: mpc8260_fec: " Tomas Hlavacek
                     ` (17 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc8220/fec.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8220/fec.c b/arch/powerpc/cpu/mpc8220/fec.c
index 9d6fcc1..289e7c2 100644
--- a/arch/powerpc/cpu/mpc8220/fec.c
+++ b/arch/powerpc/cpu/mpc8220/fec.c
@@ -799,6 +799,12 @@ static int mpc8220_fec_recv (struct eth_device *dev)
 	return len;
 }
 
+static struct eth_ops mpc8220_fec_ops = {
+	.init = mpc8220_fec_init,
+	.halt = mpc8220_fec_halt,
+	.send = mpc8220_fec_send,
+	.recv = mpc8220_fec_recv
+};
 
 /********************************************************************/
 int mpc8220_fec_initialize (bd_t * bis)
@@ -833,10 +839,7 @@ int mpc8220_fec_initialize (bd_t * bis)
 
 	dev->priv = (void *) fec;
 	dev->iobase = MMAP_FEC1;
-	dev->eo->init = mpc8220_fec_init;
-	dev->eo->halt = mpc8220_fec_halt;
-	dev->eo->send = mpc8220_fec_send;
-	dev->eo->recv = mpc8220_fec_recv;
+	dev->eo = &mpc8220_fec_ops;
 
 	sprintf (dev->name, "FEC");
 	eth_register (dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 52/67] net: mpc8260_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (50 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 51/67] net: mpc8220_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 53/67] net: mpc8260_scc: " Tomas Hlavacek
                     ` (16 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc8260/ether_fcc.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c
index 6b78235..c8dbc66 100644
--- a/arch/powerpc/cpu/mpc8260/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c
@@ -372,6 +372,13 @@ static void fec_halt(struct eth_device* dev)
 						~(FCC_GFMR_ENT | FCC_GFMR_ENR);
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int fec_initialize(bd_t *bis)
 {
 	struct eth_device* dev;
@@ -385,10 +392,7 @@ 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->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 53/67] net: mpc8260_scc: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (51 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 52/67] net: mpc8260_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 54/67] net: mpc85xx_fec: " Tomas Hlavacek
                     ` (15 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc8260/ether_scc.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8260/ether_scc.c b/arch/powerpc/cpu/mpc8260/ether_scc.c
index e56bfdf..5afe905 100644
--- a/arch/powerpc/cpu/mpc8260/ether_scc.c
+++ b/arch/powerpc/cpu/mpc8260/ether_scc.c
@@ -364,6 +364,13 @@ static void sec_restart(void)
 }
 #endif
 
+static struct eth_ops sec_ops = {
+	.init = sec_init,
+	.halt = sec_halt,
+	.send = sec_send,
+	.recv = sec_rx
+};
+
 int mpc82xx_scc_enet_initialize(bd_t *bis)
 {
 	struct eth_device *dev;
@@ -372,10 +379,7 @@ int mpc82xx_scc_enet_initialize(bd_t *bis)
 	memset(dev, 0, sizeof *dev);
 
 	sprintf(dev->name, "SCC");
-	dev->eo->init   = sec_init;
-	dev->eo->halt   = sec_halt;
-	dev->eo->send   = sec_send;
-	dev->eo->recv   = sec_rx;
+	dev->eo = &sec_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 54/67] net: mpc85xx_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (52 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 53/67] net: mpc8260_scc: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 55/67] net: mpc8xx_scc: " Tomas Hlavacek
                     ` (14 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc85xx/ether_fcc.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
index 3b9eafa..f3c188d 100644
--- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
@@ -435,6 +435,13 @@ static void fec_halt(struct eth_device* dev)
     }
 }
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int fec_initialize(bd_t *bis)
 {
 	struct eth_device* dev;
@@ -448,10 +455,7 @@ 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->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 55/67] net: mpc8xx_scc: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (53 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 54/67] net: mpc85xx_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 56/67] net: db64360/mv_eth: " Tomas Hlavacek
                     ` (13 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc8xx/scc.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c
index 801c689..1d154f5 100644
--- a/arch/powerpc/cpu/mpc8xx/scc.c
+++ b/arch/powerpc/cpu/mpc8xx/scc.c
@@ -70,6 +70,13 @@ static int scc_recv(struct eth_device* dev);
 static int scc_init (struct eth_device* dev, bd_t * bd);
 static void scc_halt(struct eth_device* dev);
 
+static struct eth_ops sec_ops = {
+	.init = scc_init,
+	.halt = scc_halt,
+	.send = scc_send,
+	.recv = scc_recv
+};
+
 int scc_initialize(bd_t *bis)
 {
 	struct eth_device* dev;
@@ -80,10 +87,7 @@ int scc_initialize(bd_t *bis)
 	sprintf(dev->name, "SCC");
 	dev->iobase = 0;
 	dev->priv   = 0;
-	dev->eo->init = scc_init;
-	dev->eo->halt = scc_halt;
-	dev->eo->send = scc_send;
-	dev->eo->recv = scc_recv;
+	dev->eo = &sec_ops;
 
 	eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 56/67] net: db64360/mv_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (54 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 55/67] net: mpc8xx_scc: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 57/67] net: mpc8xx_fec: " Tomas Hlavacek
                     ` (12 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 board/Marvell/db64360/mv_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index 226b964..a0aafc7 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -202,6 +202,13 @@ void db64360_eth_disable (struct eth_device *dev)
 }
 
 
+static struct eth_ops mv6436x_eth_ops = {
+	.init = (void *) db64360_eth_probe,
+	.halt = (void *) ethernet_phy_reset,
+	.send = (void *) db64360_eth_transmit,
+	.recv = (void *) db64360_eth_poll
+};
+
 void mv6436x_eth_initialize (bd_t * bis)
 {
 	struct eth_device *dev;
@@ -259,10 +266,7 @@ 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->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;
+		dev->eo = &mv6436x_eth_ops;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *) ethernet_private;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 57/67] net: mpc8xx_fec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (55 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 56/67] net: db64360/mv_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 58/67] net: db64460/mv_eth: " Tomas Hlavacek
                     ` (11 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 arch/powerpc/cpu/mpc8xx/fec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c
index 5934d92..5544f20 100644
--- a/arch/powerpc/cpu/mpc8xx/fec.c
+++ b/arch/powerpc/cpu/mpc8xx/fec.c
@@ -147,6 +147,13 @@ static void fec_halt(struct eth_device* dev);
 static void __mii_init(void);
 #endif
 
+static struct eth_ops fec_ops = {
+	.init = fec_init,
+	.halt = fec_halt,
+	.send = fec_send,
+	.recv = fec_recv
+};
+
 int fec_initialize(bd_t *bis)
 {
 	struct eth_device* dev;
@@ -178,10 +185,7 @@ int fec_initialize(bd_t *bis)
 		efis->actual_phy_addr = -1;
 
 		dev->priv = efis;
-		dev->eo->init = fec_init;
-		dev->eo->halt = fec_halt;
-		dev->eo->send = fec_send;
-		dev->eo->recv = fec_recv;
+		dev->eo = &fec_ops;
 
 		eth_register(dev);
 
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 58/67] net: db64460/mv_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (56 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 57/67] net: mpc8xx_fec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 59/67] net: cpci750/mv_eth: " Tomas Hlavacek
                     ` (10 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 board/Marvell/db64460/mv_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index df09be1..22bdafc 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -202,6 +202,13 @@ void db64460_eth_disable (struct eth_device *dev)
 }
 
 
+static struct eth_ops mv6446x_eth_ops = {
+	.init = (void *) db64460_eth_probe,
+	.halt = (void *) ethernet_phy_reset,
+	.send = (void *) db64460_eth_transmit,
+	.recv = (void *) db64460_eth_poll
+};
+
 void mv6446x_eth_initialize (bd_t * bis)
 {
 	struct eth_device *dev;
@@ -259,10 +266,7 @@ 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->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;
+		dev->eo = &mv6446x_eth_ops;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *)ethernet_private;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 59/67] net: cpci750/mv_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (57 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 58/67] net: db64460/mv_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 60/67] net: evb64260: " Tomas Hlavacek
                     ` (9 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 board/esd/cpci750/mv_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index 8be3f9b..f825780 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -202,6 +202,13 @@ void db64360_eth_disable (struct eth_device *dev)
 }
 
 
+static struct eth_ops mv6436x_eth_ops = {
+	.init = (void *) db64360_eth_probe,
+	.halt = (void *) ethernet_phy_reset,
+	.send = (void *) db64360_eth_transmit,
+	.recv = (void *) db64360_eth_poll
+};
+
 void mv6436x_eth_initialize (bd_t * bis)
 {
 	struct eth_device *dev;
@@ -259,10 +266,7 @@ 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->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;
+		dev->eo = &mv6436x_eth_ops;
 
 		ethernet_private =
 			calloc (sizeof (*ethernet_private), 1);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 60/67] net: evb64260: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (58 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 59/67] net: cpci750/mv_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 61/67] net: p3mx/mv_eth: " Tomas Hlavacek
                     ` (8 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 board/evb64260/eth.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index 783e0ae..6f4300d 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -664,6 +664,14 @@ gt6426x_eth_probe(void *v, bd_t *bis)
 	return 1;
 }
 
+
+static struct eth_ops gt6426x_eth_ops = {
+	.init = (void *) gt6426x_eth_probe,
+	.halt = (void *) gt6426x_eth_reset,
+	.send = (void *) gt6426x_eth_transmit,
+	.recv = (void *) gt6426x_eth_poll
+};
+
 /* enter all the galileo ethernet devs into MULTI-BOOT */
 void
 gt6426x_eth_initialize(bd_t *bis)
@@ -720,10 +728,7 @@ gt6426x_eth_initialize(bd_t *bis)
 				s = (*e) ? e+1 : e;
 		}
 
-		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;
+		dev->eo = &gt6426x_eth_ops;
 
 		p = calloc( sizeof(*p), 1 );
 		dev->priv = (void*)p;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 61/67] net: p3mx/mv_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (59 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 60/67] net: evb64260: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 62/67] net: cpsw: " Tomas Hlavacek
                     ` (7 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 board/prodrive/p3mx/mv_eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/board/prodrive/p3mx/mv_eth.c b/board/prodrive/p3mx/mv_eth.c
index 69c2dba..cba749b 100644
--- a/board/prodrive/p3mx/mv_eth.c
+++ b/board/prodrive/p3mx/mv_eth.c
@@ -246,6 +246,13 @@ void mv_eth_phy_init (void)
 	MV_REG_WRITE (ETH_PHY_DFCDL_CONFIG0_REG, 0x300000);
 }
 
+static struct eth_ops db64460_eth_ops = {
+	.init = (void *) db64460_eth_probe,
+	.halt = (void *) ethernet_phy_reset,
+	.send = (void *) db64460_eth_transmit,
+	.recv = (void *) db64460_eth_poll
+};
+
 void mv6446x_eth_initialize (bd_t * bis)
 {
 	struct eth_device *dev;
@@ -309,10 +316,7 @@ 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->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;
+		dev->eo = &db64460_eth_ops;
 
 		ethernet_private = calloc (sizeof (*ethernet_private), 1);
 		dev->priv = (void *)ethernet_private;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 62/67] net: cpsw: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (60 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 61/67] net: p3mx/mv_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 63/67] net: fm_eth: " Tomas Hlavacek
                     ` (6 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/cpsw.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index c120d4e..1e2ca40 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -931,6 +931,13 @@ static int cpsw_phy_init(struct eth_device *dev, struct cpsw_slave *slave)
 	return 1;
 }
 
+static struct eth_ops cpsw_ops = {
+	.init = cpsw_init,
+	.halt = cpsw_halt,
+	.send = cpsw_send,
+	.recv = cpsw_recv
+};
+
 int cpsw_register(struct cpsw_platform_data *data)
 {
 	struct cpsw_priv	*priv;
@@ -974,10 +981,7 @@ int cpsw_register(struct cpsw_platform_data *data)
 
 	strcpy(dev->name, "cpsw");
 	dev->iobase	= 0;
-	dev->eo->init	= cpsw_init;
-	dev->eo->halt	= cpsw_halt;
-	dev->eo->send	= cpsw_send;
-	dev->eo->recv	= cpsw_recv;
+	dev->eo	= &cpsw_ops;
 	dev->priv	= priv;
 
 	eth_register(dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 63/67] net: fm_eth: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (61 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 62/67] net: cpsw: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 64/67] net: ftmac100: " Tomas Hlavacek
                     ` (5 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/fm/eth.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 8d881d4..d148957 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -611,6 +611,13 @@ static int init_phy(struct eth_device *dev)
 	return 0;
 }
 
+static struct eth_ops fm_eth_ops = {
+	.init = fm_eth_open,
+	.halt = fm_eth_halt,
+	.send = fm_eth_send,
+	.recv = fm_eth_recv
+};
+
 int fm_eth_initialize(struct ccsr_fman *reg, struct fm_eth_info *info)
 {
 	struct eth_device *dev;
@@ -653,10 +660,7 @@ 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->eo->init = fm_eth_open;
-	dev->eo->halt = fm_eth_halt;
-	dev->eo->send = fm_eth_send;
-	dev->eo->recv = fm_eth_recv;
+	dev->eo = &fm_eth_ops;
 	fm_eth->dev = dev;
 	fm_eth->bus = info->bus;
 	fm_eth->phyaddr = info->phy_addr;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 64/67] net: ftmac100: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (62 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 63/67] net: fm_eth: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 65/67] net: qe: uec: " Tomas Hlavacek
                     ` (4 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/net/ftmac100.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index 6fd2bde..c353b3d 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -236,6 +236,13 @@ static int ftmac100_send(struct eth_device *dev, void *packet, int length)
 	return 0;
 }
 
+static struct eth_ops ftmac100_ops = {
+	.init = ftmac100_init,
+	.halt = ftmac100_halt,
+	.send = ftmac100_send,
+	.recv = ftmac100_recv
+};
+
 int ftmac100_initialize (bd_t *bd)
 {
 	struct eth_device *dev;
@@ -260,10 +267,7 @@ int ftmac100_initialize (bd_t *bd)
 
 	sprintf (dev->name, "FTMAC100");
 	dev->iobase	= CONFIG_FTMAC100_BASE;
-	dev->eo->init	= ftmac100_init;
-	dev->eo->halt	= ftmac100_halt;
-	dev->eo->send	= ftmac100_send;
-	dev->eo->recv	= ftmac100_recv;
+	dev->eo		= &ftmac100_ops;
 	dev->priv	= priv;
 
 	eth_register (dev);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 65/67] net: qe: uec: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (63 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 64/67] net: ftmac100: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 66/67] net: usb: asix: " Tomas Hlavacek
                     ` (3 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/qe/uec.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 0aded61..09e267a 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -1361,6 +1361,13 @@ static int uec_recv(struct eth_device* dev)
 	return 1;
 }
 
+static struct eth_ops uec_ops = {
+	.init = uec_init,
+	.halt = uec_halt,
+	.send = uec_send,
+	.recv = uec_recv
+};
+
 int uec_initialize(bd_t *bis, uec_info_t *uec_info)
 {
 	struct eth_device	*dev;
@@ -1394,10 +1401,7 @@ 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->eo->init = uec_init;
-	dev->eo->halt = uec_halt;
-	dev->eo->send = uec_send;
-	dev->eo->recv = uec_recv;
+	dev->eo = &uec_ops;
 
 	/* Clear the ethnet address */
 	for (i = 0; i < 6; i++)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 66/67] net: usb: asix: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (64 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 65/67] net: qe: uec: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 67/67] net: usb: smsc95xx: " Tomas Hlavacek
                     ` (2 subsequent siblings)
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/usb/eth/asix.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index f2cea6b..ed8bcdd 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -692,6 +692,13 @@ int asix_eth_probe(struct usb_device *dev, unsigned int ifnum,
 	return 1;
 }
 
+static struct eth_ops asix_ops = {
+	.init = asix_init,
+	.halt = asix_halt,
+	.send = asix_send,
+	.recv = asix_recv
+};
+
 int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 				struct eth_device *eth)
 {
@@ -702,10 +709,7 @@ 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->eo->init = asix_init;
-	eth->eo->send = asix_send;
-	eth->eo->recv = asix_recv;
-	eth->eo->halt = asix_halt;
+	eth->eo = &asix_ops;
 	if (!(priv->flags & FLAG_TYPE_AX88172))
 		eth->eo->write_hwaddr = asix_write_hwaddr;
 	eth->priv = ss;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 67/67] net: usb: smsc95xx: Pull out init of struct eth_ops
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (65 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 66/67] net: usb: asix: " Tomas Hlavacek
@ 2012-11-21 13:23   ` Tomas Hlavacek
  2012-11-21 14:01   ` [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup Wolfgang Denk
  2012-11-21 18:45   ` Langer Thomas
  68 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-21 13:23 UTC (permalink / raw)
  To: u-boot

Add static struct eth_ops and set ops function pointers statically.
Remove setting eth_ops members dynamically.

This is a step toward converting the driver for DM.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
---
 drivers/usb/eth/smsc95xx.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index b8c2f2e..9f278c5 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -881,6 +881,14 @@ int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum,
 	return 1;
 }
 
+static struct eth_ops smsc95xx_ops = {
+	.init = smsc95xx_init,
+	.halt = smsc95xx_halt,
+	.send = smsc95xx_send,
+	.recv = smsc95xx_recv,
+	.write_hwaddr = smsc95xx_write_hwaddr
+};
+
 int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 				struct eth_device *eth)
 {
@@ -890,11 +898,7 @@ 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->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->eo = &smsc95xx_ops;
 	eth->priv = ss;
 	return 1;
 }
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (66 preceding siblings ...)
  2012-11-21 13:23   ` [U-Boot] [PATCH v2 67/67] net: usb: smsc95xx: " Tomas Hlavacek
@ 2012-11-21 14:01   ` Wolfgang Denk
  2012-11-21 18:45   ` Langer Thomas
  68 siblings, 0 replies; 127+ messages in thread
From: Wolfgang Denk @ 2012-11-21 14:01 UTC (permalink / raw)
  To: u-boot

Dear Tomas Hlavacek,

In message <1353504238-11277-1-git-send-email-tmshlvck@gmail.com> you wrote:
>
>   - Prove bisectability:
> 
> MAKEALL arm (1/67 applied):
> Boards compiled: 274
> 
> MAKEALL arm (49/67 applied):
> Boards compiled: 274
> 
> MAKEALL arm (67/67 applied):
> Boards compiled: 274

To actually prove bisectability, so have to build all architectures
(and not only a selection) for each and every commit (not only for a
selection).   And in addition to building, you have to verify that the
resulting code actually works.

>  69 files changed, 590 insertions(+), 309 deletions(-)

What's the impact on the memory footprint?

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If a computer can't directly address all the RAM you can  use,  it's
just a toy."         - anonymous comp.sys.amiga posting, non-sequitir

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup
  2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
                     ` (67 preceding siblings ...)
  2012-11-21 14:01   ` [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup Wolfgang Denk
@ 2012-11-21 18:45   ` Langer Thomas
  2012-11-22  0:40     ` Tomas Hlavacek
  68 siblings, 1 reply; 127+ messages in thread
From: Langer Thomas @ 2012-11-21 18:45 UTC (permalink / raw)
  To: u-boot

Hello Tomas,

sorry for not replying to V1 series already. I have a remark:

> 2) Replace dynamic init of ops function pointers by static struct.

Some ARCHs don't have full relocation until now, which breaks the static initialization of pointers!
Please see this:
$ grep -r "#define.*CONFIG_NEEDS_MANUAL_RELOC" *
arch/nds32/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
arch/sparc/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
arch/m68k/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
arch/avr32/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
arch/mips/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC

I don't see any fixups for these cases. I assume, you haven't done any runtime test on any 
of the relevant platforms?

Adding this manual relocation to eth_register() should be no problem.
But to be bisectable, please be careful to detect the difference of statically or dynamically initialized structures, because  you may have both while applying the series.

Best Regards,
Thomas

^ permalink raw reply	[flat|nested] 127+ messages in thread

* [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup
  2012-11-21 18:45   ` Langer Thomas
@ 2012-11-22  0:40     ` Tomas Hlavacek
  0 siblings, 0 replies; 127+ messages in thread
From: Tomas Hlavacek @ 2012-11-22  0:40 UTC (permalink / raw)
  To: u-boot

Hello Thomas!

On Wed, Nov 21, 2012 at 7:45 PM, Langer Thomas (LQDE RD ST PON SW)
<thomas.langer@lantiq.com> wrote:
> Hello Tomas,
>
> sorry for not replying to V1 series already. I have a remark:
>
>> 2) Replace dynamic init of ops function pointers by static struct.
>
> Some ARCHs don't have full relocation until now, which breaks the static initialization of pointers!
> Please see this:
> $ grep -r "#define.*CONFIG_NEEDS_MANUAL_RELOC" *
> arch/nds32/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
> arch/sparc/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
> arch/m68k/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
> arch/avr32/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
> arch/mips/include/asm/config.h:#define CONFIG_NEEDS_MANUAL_RELOC
>
> I don't see any fixups for these cases. I assume, you haven't done any runtime test on any
> of the relevant platforms?

No... With only two exceptions and both were tested in QEMU, not on real HW.

>
> Adding this manual relocation to eth_register() should be no problem.
> But to be bisectable, please be careful to detect the difference of statically or dynamically initialized structures, because  you may have both while applying the series.

Thanks for the remark. I will do that in the next version.

Tomas

^ permalink raw reply	[flat|nested] 127+ messages in thread

end of thread, other threads:[~2012-11-22  0:40 UTC | newest]

Thread overview: 127+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02 17:17 [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 01/50] net: Pull out ops from struct eth_device Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 02/50] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 03/50] net: altera_tse: " Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 04/50] net: dm9000x: " Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 05/50] net: armada100_fec: " Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 06/50] net: at91_emac: " Tomas Hlavacek
2012-11-02 17:17 ` [U-Boot] [RFC PATCH 07/50] net: ax88180: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 08/50] net: bfin_mac: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 09/50] net: calxedaxgmac: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 10/50] net: cpsw: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 11/50] net: cs8900: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 12/50] net: davinci_emac: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 13/50] net: dc2114x: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 14/50] net: designware: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 15/50] net: dnet: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 16/50] net: e1000: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 17/50] net: eepro100: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 18/50] net: enc28j60: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 19/50] net: ep93xx_eth: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 20/50] net: ethoc: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 21/50] net: fec_mxc: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 22/50] net: ftgmac100: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 23/50] net: greth.c: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 24/50] net: fsl_mcdmafec: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 25/50] net: inca-ip_sw: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 26/50] net: ks8695eth: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 27/50] net: lan91c96: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 28/50] net: macb: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 29/50] net: mcffec: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 30/50] net: mpc5xxx_fec: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 31/50] net: mvgbe: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 32/50] net: mpc512x_fec: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 33/50] net: natsemi: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 34/50] net: ne2000: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 35/50] net: npe: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 36/50] net: ns8382x: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 37/50] net: pcnet: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 38/50] net: plb2800_eth: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 39/50] net: rtl8139: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 40/50] net: rtl8169: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 41/50] net: smc91111: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 42/50] net: smc911x: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 43/50] net: tsec: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 44/50] net: tsi108_eth: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 45/50] net: uli526x: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 46/50] net: xilinx_axi_emac: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 47/50] net: xilinx_emaclite: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 48/50] net: zynq_gem: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 49/50] net: xilinx_ll_temac: " Tomas Hlavacek
2012-11-02 17:18 ` [U-Boot] [RFC PATCH 50/50] net: sh_eth: " Tomas Hlavacek
2012-11-02 17:24 ` [U-Boot] [RFC PATCH 00/50] net: net subsystem ops cleanup Marek Vasut
2012-11-03 15:09 ` Wolfgang Denk
2012-11-03 23:23   ` Tomas Hlavacek
2012-11-14  0:06     ` Joe Hershberger
2012-11-20  2:06       ` Tomas Hlavacek
2012-11-21 13:22 ` [U-Boot] [PATCH v2 00/67] " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 01/67] net: dm: Pull out ops from struct eth_device Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 02/67] net: 4xx_enet: Pull out init of struct eth_ops Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 03/67] net: altera_tse: " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 04/67] net: dm9000x: " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 05/67] net: armada100_fec: " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 06/67] net: at91_emac: " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 07/67] net: ax88180: " Tomas Hlavacek
2012-11-21 13:22   ` [U-Boot] [PATCH v2 08/67] net: bfin_mac: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 09/67] net: calxedaxgmac: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 10/67] net: cs8900: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 11/67] net: davinci_emac: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 12/67] net: dc2114x: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 13/67] net: designware: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 14/67] net: dnet: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 15/67] net: e1000: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 16/67] net: eepro100: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 17/67] net: enc28j60: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 18/67] net: ep93xx_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 19/67] net: ethoc: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 20/67] net: fec_mxc: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 21/67] net: ftgmac100: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 22/67] net: greth.c: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 23/67] net: fsl_mcdmafec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 24/67] net: inca-ip_sw: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 25/67] net: ks8695eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 26/67] net: lan91c96: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 27/67] net: macb: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 28/67] net: mcffec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 29/67] net: mpc5xxx_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 30/67] net: mvgbe: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 31/67] net: mpc512x_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 32/67] net: natsemi: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 33/67] net: ne2000: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 34/67] net: npe: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 35/67] net: ns8382x: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 36/67] net: pcnet: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 37/67] net: plb2800_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 38/67] net: rtl8139: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 39/67] net: rtl8169: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 40/67] net: smc91111: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 41/67] net: smc911x: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 42/67] net: tsec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 43/67] net: tsi108_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 44/67] net: uli526x: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 45/67] net: xilinx_axi_emac: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 46/67] net: xilinx_emaclite: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 47/67] net: zynq_gem: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 48/67] net: xilinx_ll_temac: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 49/67] net: sh_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 50/67] net: au1x00_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 51/67] net: mpc8220_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 52/67] net: mpc8260_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 53/67] net: mpc8260_scc: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 54/67] net: mpc85xx_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 55/67] net: mpc8xx_scc: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 56/67] net: db64360/mv_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 57/67] net: mpc8xx_fec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 58/67] net: db64460/mv_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 59/67] net: cpci750/mv_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 60/67] net: evb64260: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 61/67] net: p3mx/mv_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 62/67] net: cpsw: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 63/67] net: fm_eth: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 64/67] net: ftmac100: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 65/67] net: qe: uec: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 66/67] net: usb: asix: " Tomas Hlavacek
2012-11-21 13:23   ` [U-Boot] [PATCH v2 67/67] net: usb: smsc95xx: " Tomas Hlavacek
2012-11-21 14:01   ` [U-Boot] [PATCH v2 00/67] net: net subsystem ops cleanup Wolfgang Denk
2012-11-21 18:45   ` Langer Thomas
2012-11-22  0:40     ` Tomas Hlavacek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.