Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API

All in-tree boards that use this controller have CONFIG_NET_MULTI
added
Also:
  - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111
  - cleaned up line lengths
  - modified all boards that override weak function in this driver
  - modified all eeprom standalone apps to work with new driver
  - updated blackfin standalone EEPROM app after testing

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
diff --git a/include/configs/EP1C20.h b/include/configs/EP1C20.h
index 8941e4d..61d8e20 100644
--- a/include/configs/EP1C20.h
+++ b/include/configs/EP1C20.h
@@ -151,7 +151,8 @@
  * cache bypass so there's no need to monkey with inx/outx macros.
  *----------------------------------------------------------------------*/
 #define CONFIG_SMC91111_BASE	0x82110300	/* Base addr (bypass)	*/
-#define CONFIG_DRIVER_SMC91111			/* Using SMC91c111	*/
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111			/* Using SMC91c111	*/
 #undef	CONFIG_SMC91111_EXT_PHY			/* Internal PHY		*/
 #define CONFIG_SMC_USE_32_BIT			/* 32-bit interface	*/
 
diff --git a/include/configs/EP1S10.h b/include/configs/EP1S10.h
index 53bd0d8..41e64e6 100644
--- a/include/configs/EP1S10.h
+++ b/include/configs/EP1S10.h
@@ -145,7 +145,8 @@
  * cache bypass so there's no need to monkey with inx/outx macros.
  *----------------------------------------------------------------------*/
 #define CONFIG_SMC91111_BASE	0x82110300	/* Base addr (bypass)	*/
-#define CONFIG_DRIVER_SMC91111			/* Using SMC91c111	*/
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111			/* Using SMC91c111	*/
 #undef	CONFIG_SMC91111_EXT_PHY			/* Internal PHY		*/
 #define CONFIG_SMC_USE_32_BIT			/* 32-bit interface	*/
 
diff --git a/include/configs/EP1S40.h b/include/configs/EP1S40.h
index 9e9a8a4..5b332e4 100644
--- a/include/configs/EP1S40.h
+++ b/include/configs/EP1S40.h
@@ -145,7 +145,8 @@
  * cache bypass so there's no need to monkey with inx/outx macros.
  *----------------------------------------------------------------------*/
 #define CONFIG_SMC91111_BASE	0x82110300	/* Base addr (bypass)	*/
-#define CONFIG_DRIVER_SMC91111			/* Using SMC91c111	*/
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111			/* Using SMC91c111	*/
 #undef	CONFIG_SMC91111_EXT_PHY			/* Internal PHY		*/
 #define CONFIG_SMC_USE_32_BIT			/* 32-bit interface	*/
 
diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h
index 3853574..6083892 100644
--- a/include/configs/MigoR.h
+++ b/include/configs/MigoR.h
@@ -50,7 +50,8 @@
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /* SMC9111 */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE    (0xB0000000)
 
 /* MEMORY */
diff --git a/include/configs/PK1C20.h b/include/configs/PK1C20.h
index 522349f..cf6f7a9 100644
--- a/include/configs/PK1C20.h
+++ b/include/configs/PK1C20.h
@@ -151,7 +151,8 @@
  * cache bypass so there's no need to monkey with inx/outx macros.
  *----------------------------------------------------------------------*/
 #define CONFIG_SMC91111_BASE	0x82110300	/* Base addr (bypass)	*/
-#define CONFIG_DRIVER_SMC91111			/* Using SMC91c111	*/
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111			/* Using SMC91c111	*/
 #undef	CONFIG_SMC91111_EXT_PHY			/* Internal PHY		*/
 #define CONFIG_SMC_USE_32_BIT			/* 32-bit interface	*/
 
diff --git a/include/configs/bf533-ezkit.h b/include/configs/bf533-ezkit.h
index 8342ec7..c80ddca 100644
--- a/include/configs/bf533-ezkit.h
+++ b/include/configs/bf533-ezkit.h
@@ -65,12 +65,14 @@
  * Network Settings
  */
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x20310300
 #define SMC91111_EEPROM_INIT() \
 	do { \
-		*pFIO_DIR |= PF1; \
-		*pFIO_FLAG_S = PF1; \
+		bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF1 | PF0); \
+		bfin_write_FIO_FLAG_C(PF1); \
+		bfin_write_FIO_FLAG_S(PF0); \
 		SSYNC(); \
 	} while (0)
 #define CONFIG_HOSTNAME		bf533-ezkit
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index 4be2a5c..0006b02 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -60,12 +60,14 @@
  * Network Settings
  */
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x20300300
 #define SMC91111_EEPROM_INIT() \
 	do { \
-		*pFIO_DIR |= PF1; \
-		*pFIO_FLAG_S = PF1; \
+		bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF1 | PF0); \
+		bfin_write_FIO_FLAG_C(PF1); \
+		bfin_write_FIO_FLAG_S(PF0); \
 		SSYNC(); \
 	} while (0)
 #define CONFIG_HOSTNAME		bf533-stamp
diff --git a/include/configs/bf538f-ezkit.h b/include/configs/bf538f-ezkit.h
index 535687f..c4d899d 100644
--- a/include/configs/bf538f-ezkit.h
+++ b/include/configs/bf538f-ezkit.h
@@ -60,7 +60,8 @@
  * Network Settings
  */
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x20310300
 #define CONFIG_HOSTNAME		bf538f-ezkit
 /* Uncomment next line to use fixed MAC address */
diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h
index 4779a97..a1fa80b 100644
--- a/include/configs/bf561-ezkit.h
+++ b/include/configs/bf561-ezkit.h
@@ -60,7 +60,8 @@
  * Network Settings
  */
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x2C010300
 #define CONFIG_SMC_USE_32_BIT	1
 #define CONFIG_HOSTNAME		bf561-ezkit
diff --git a/include/configs/blackstamp.h b/include/configs/blackstamp.h
index 887f3fb..aa33933 100644
--- a/include/configs/blackstamp.h
+++ b/include/configs/blackstamp.h
@@ -30,7 +30,8 @@
 /*
  * Board settings
  */
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x20300300
 
 /* FLASH/ETHERNET uses the same address range
@@ -69,7 +70,7 @@
  * Network settings
  */
 
-#ifdef CONFIG_DRIVER_SMC91111
+#ifdef CONFIG_SMC91111
 #define CONFIG_IPADDR		192.168.0.15
 #define CONFIG_NETMASK		255.255.255.0
 #define CONFIG_GATEWAYIP	192.168.0.1
@@ -108,7 +109,7 @@
 
 #include <config_cmd_default.h>
 
-#ifdef CONFIG_DRIVER_SMC91111
+#ifdef CONFIG_SMC91111
 # define CONFIG_CMD_DHCP
 # define CONFIG_CMD_PING
 #else
diff --git a/include/configs/cerf250.h b/include/configs/cerf250.h
index b924758..477b94a 100644
--- a/include/configs/cerf250.h
+++ b/include/configs/cerf250.h
@@ -53,7 +53,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE 0x04000300
 #define CONFIG_SMC_USE_32_BIT
 
diff --git a/include/configs/cm-bf533.h b/include/configs/cm-bf533.h
index ea548e9..06eb288 100644
--- a/include/configs/cm-bf533.h
+++ b/include/configs/cm-bf533.h
@@ -60,7 +60,8 @@
  * Network Settings
  */
 #define ADI_CMDS_NETWORK	1
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x20200300
 #define CONFIG_HOSTNAME		cm-bf533
 /* Uncomment next line to use fixed MAC address */
diff --git a/include/configs/cm-bf561.h b/include/configs/cm-bf561.h
index 59dc8d2..4a77435 100644
--- a/include/configs/cm-bf561.h
+++ b/include/configs/cm-bf561.h
@@ -61,7 +61,8 @@
  */
 #define ADI_CMDS_NETWORK	1
 /* The next 2 lines are for use with DEV-BF5xx */
-#define CONFIG_DRIVER_SMC91111	1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	1
 #define CONFIG_SMC91111_BASE	0x28000300
 /* The next 3 lines are for use with EXT-BF5xx-USB-ETH2 */
 /* #define CONFIG_DRIVER_SMC911X 1 */
diff --git a/include/configs/cradle.h b/include/configs/cradle.h
index b150c22..200b61e 100644
--- a/include/configs/cradle.h
+++ b/include/configs/cradle.h
@@ -49,7 +49,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE 0x10000300
 #define CONFIG_SMC91111_EXT_PHY
 #define CONFIG_SMC_USE_32_BIT
diff --git a/include/configs/dnp1110.h b/include/configs/dnp1110.h
index b6cfc67..e48e20f 100644
--- a/include/configs/dnp1110.h
+++ b/include/configs/dnp1110.h
@@ -54,7 +54,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE 0x20000300
 
 
diff --git a/include/configs/gr_cpci_ax2000.h b/include/configs/gr_cpci_ax2000.h
index bbe635b..d188439 100644
--- a/include/configs/gr_cpci_ax2000.h
+++ b/include/configs/gr_cpci_ax2000.h
@@ -292,7 +292,8 @@
 /*
  * Ethernet configuration uses on board SMC91C111
  */
-#define CONFIG_DRIVER_SMC91111          1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111          1
 #define CONFIG_SMC91111_BASE		0x20000300	/* chip select 3         */
 #define CONFIG_SMC_USE_32_BIT		1	/* 32 bit bus  */
 #undef  CONFIG_SMC_91111_EXT_PHY	/* we use internal phy   */
diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h
index 7b0a08f..3a568ff 100644
--- a/include/configs/gr_ep2s60.h
+++ b/include/configs/gr_ep2s60.h
@@ -267,7 +267,8 @@
 #ifndef USE_GRETH
 
 /* USE SMC91C111 MAC */
-#define CONFIG_DRIVER_SMC91111          1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111          1
 #define CONFIG_SMC91111_BASE		0x20000300	/* chip select 3         */
 #define CONFIG_SMC_USE_32_BIT		1	/* 32 bit bus  */
 #undef  CONFIG_SMC_91111_EXT_PHY	/* we use internal phy   */
diff --git a/include/configs/innokom.h b/include/configs/innokom.h
index ed03ad3..9cb0d42 100644
--- a/include/configs/innokom.h
+++ b/include/configs/innokom.h
@@ -157,7 +157,8 @@
 /*
  * SMSC91C111 Network Card
  */
-#define CONFIG_DRIVER_SMC91111		1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111		1
 #define CONFIG_SMC91111_BASE		0x14000000 /* chip select 5         */
 #undef  CONFIG_SMC_USE_32_BIT		           /* 16 bit bus access     */
 #undef  CONFIG_SMC_91111_EXT_PHY		   /* we use internal phy   */
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index e38d569..caafc93 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -53,7 +53,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC_USE_32_BIT
 #define CONFIG_SMC91111_BASE    0xC8000000
 #undef CONFIG_SMC91111_EXT_PHY
diff --git a/include/configs/logodl.h b/include/configs/logodl.h
index 5b903f0..0535ee1 100644
--- a/include/configs/logodl.h
+++ b/include/configs/logodl.h
@@ -133,7 +133,8 @@
  * SMSC91C111 Network Card
  */
 #if 0
-#define CONFIG_DRIVER_SMC91111		1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111		1
 #define CONFIG_SMC91111_BASE		0x10000000 /* chip select 4         */
 #undef  CONFIG_SMC_USE_32_BIT		           /* 16 bit bus access     */
 #undef  CONFIG_SMC_91111_EXT_PHY		   /* we use internal phy   */
diff --git a/include/configs/lpd7a400-10.h b/include/configs/lpd7a400-10.h
index 6145c37..5f57c3a 100644
--- a/include/configs/lpd7a400-10.h
+++ b/include/configs/lpd7a400-10.h
@@ -72,7 +72,8 @@
  * Default IO base of chip is 0x300, Card Engine has this address lines
  * (LAN chip) tied to Vcc, so we just care about the chip select
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE	(0x70000000)
 #undef CONFIG_SMC_USE_32_BIT
 #define CONFIG_SMC_USE_IOFUNCS
diff --git a/include/configs/lpd7a404-10.h b/include/configs/lpd7a404-10.h
index ce23f3d..9074e28 100644
--- a/include/configs/lpd7a404-10.h
+++ b/include/configs/lpd7a404-10.h
@@ -72,7 +72,8 @@
  * Default IO base of chip is 0x300, Card Engine has this address lines
  * (LAN chip) tied to Vcc, so we just care about the chip select
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE	(0x70000000)
 #undef CONFIG_SMC_USE_32_BIT
 #define CONFIG_SMC_USE_IOFUNCS
diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h
index 6755af3..0251428 100644
--- a/include/configs/ms7722se.h
+++ b/include/configs/ms7722se.h
@@ -48,7 +48,8 @@
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /* SMC9111 */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE    (0xB8000000)
 
 /* MEMORY */
diff --git a/include/configs/netstar.h b/include/configs/netstar.h
index f0b4207..7bddf24 100644
--- a/include/configs/netstar.h
+++ b/include/configs/netstar.h
@@ -93,7 +93,8 @@
 #define CONFIG_SYS_NS16550_CLK		(CONFIG_XTAL_FREQ)	/* can be 12M/32Khz or 48Mhz  */
 #define CONFIG_SYS_NS16550_COM1		OMAP1510_UART1_BASE	/* uart1 */
 
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE		0x04000300
 
 #define CONFIG_SYS_FLASH_BASE		PHYS_FLASH_1
diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h
index 027e8e1..a00c2fb 100644
--- a/include/configs/nhk8815.h
+++ b/include/configs/nhk8815.h
@@ -132,7 +132,8 @@
 #define __io(a)			((void __iomem *)(PCI_IO_VADDR + (a)))
 #define __mem_isa(a)		((a) + PCI_MEMORY_VADDR)
 
-#define CONFIG_DRIVER_SMC91111	/* Using SMC91c111*/
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111	/* Using SMC91c111*/
 #define CONFIG_SMC91111_BASE	0x34000300
 #undef  CONFIG_SMC91111_EXT_PHY	/* Internal PHY */
 #define CONFIG_SMC_USE_32_BIT
diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h
index 2cae8ca..6c1defc 100644
--- a/include/configs/pxa255_idp.h
+++ b/include/configs/pxa255_idp.h
@@ -87,7 +87,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE	(PXA_CS5_PHYS + IDP_CS5_ETH_OFFSET + 0x300)
 #define CONFIG_SMC_USE_32_BIT	1
 /* #define CONFIG_SMC_USE_IOFUNCS */
diff --git a/include/configs/versatile.h b/include/configs/versatile.h
index a9b70cc..4273b84 100644
--- a/include/configs/versatile.h
+++ b/include/configs/versatile.h
@@ -82,7 +82,8 @@
  * Hardware drivers
  */
 
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC_USE_32_BIT
 #define CONFIG_SMC91111_BASE	0x10010000
 #undef CONFIG_SMC91111_EXT_PHY
diff --git a/include/configs/voiceblue.h b/include/configs/voiceblue.h
index c9c3132..0dde65d 100644
--- a/include/configs/voiceblue.h
+++ b/include/configs/voiceblue.h
@@ -94,7 +94,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE	0x08000300
 
 #define CONFIG_HARD_I2C
diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h
index 83883f6..1329f0f 100644
--- a/include/configs/xaeniax.h
+++ b/include/configs/xaeniax.h
@@ -196,7 +196,8 @@
 /*
  * SMSC91C111 Network Card
  */
-#define CONFIG_DRIVER_SMC91111		1
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111		1
 #define CONFIG_SMC91111_BASE		0x10000300  /* chip select 3         */
 #define CONFIG_SMC_USE_32_BIT		1          /* 32 bit bus  */
 #undef  CONFIG_SMC_91111_EXT_PHY		   /* we use internal phy   */
diff --git a/include/configs/xm250.h b/include/configs/xm250.h
index f18701a..cd56ce7 100644
--- a/include/configs/xm250.h
+++ b/include/configs/xm250.h
@@ -50,7 +50,8 @@
 /*
  * Hardware drivers
  */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE		0x04000300
 #undef	CONFIG_SMC91111_EXT_PHY
 #define CONFIG_SMC_USE_32_BIT
diff --git a/include/configs/xsengine.h b/include/configs/xsengine.h
index 2697cca..f68461b 100644
--- a/include/configs/xsengine.h
+++ b/include/configs/xsengine.h
@@ -94,7 +94,8 @@
 #define CONFIG_SYS_GBL_DATA_SIZE		128		/* size in bytes reserved for initial data */
 
 /* Hardware drivers */
-#define CONFIG_DRIVER_SMC91111
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC91111
 #define CONFIG_SMC91111_BASE		0x04000300
 #define CONFIG_SMC_USE_32_BIT		1
 
diff --git a/include/configs/zylonite.h b/include/configs/zylonite.h
index 86b6ea1..36c341e 100644
--- a/include/configs/zylonite.h
+++ b/include/configs/zylonite.h
@@ -62,7 +62,7 @@
 
 #undef TURN_ON_ETHERNET
 #ifdef TURN_ON_ETHERNET
-# define CONFIG_DRIVER_SMC91111 1
+# define CONFIG_SMC91111 1
 # define CONFIG_SMC91111_BASE   0x14000300
 # define CONFIG_SMC91111_EXT_PHY
 # define CONFIG_SMC_USE_32_BIT
diff --git a/include/netdev.h b/include/netdev.h
index a50ec67..a91368e 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -75,6 +75,7 @@
 int scc_initialize(bd_t *bis);
 int skge_initialize(bd_t *bis);
 int smc911x_initialize(u8 dev_num, int base_addr);
+int smc91111_initialize(u8 dev_num, int base_addr);
 int tsi108_eth_initialize(bd_t *bis);
 int uec_initialize(int index);
 int uec_standard_init(bd_t *bis);