summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2009-08-25 13:09:37 -0700
committerBen Warren <biggerbadderben@gmail.com>2009-08-25 13:35:54 -0700
commitb1c0eaac110bc919e5b4e88821348e714493f266 (patch)
tree83afd97b738803932cef748fd4de3e82e4ef259a /include
parentd47628a6ecf80cd4584a50b6c795b90c985a48e5 (diff)
downloadu-boot-imx-b1c0eaac110bc919e5b4e88821348e714493f266.zip
u-boot-imx-b1c0eaac110bc919e5b4e88821348e714493f266.tar.gz
u-boot-imx-b1c0eaac110bc919e5b4e88821348e714493f266.tar.bz2
Convert CS8900 Ethernet driver to CONFIG_NET_MULTI API
All in-tree boards that use this controller have CONFIG_NET_MULTI added Also: - changed CONFIG_DRIVER_CS8900 to CONFIG_CS8900 - changed CS8900_BASE to CONFIG_CS8900_BASE - changed CS8900_BUS?? to CONFIG_CS8900_BUS?? - cleaned up line lengths - modified VCMA9 command function that accesses the device - removed MAC address initialization from lib_arm/board.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/configs/ADNPESC1.h14
-rw-r--r--include/configs/DK1C20.h14
-rw-r--r--include/configs/DK1S10.h14
-rw-r--r--include/configs/VCMA9.h7
-rw-r--r--include/configs/armadillo.h9
-rw-r--r--include/configs/csb226.h7
-rw-r--r--include/configs/ep7312.h9
-rw-r--r--include/configs/impa7.h7
-rw-r--r--include/configs/lart.h7
-rw-r--r--include/configs/mx1ads.h7
-rw-r--r--include/configs/mx31ads.h7
-rw-r--r--include/configs/sbc2410x.h7
-rw-r--r--include/configs/smdk2400.h7
-rw-r--r--include/configs/smdk2410.h7
-rw-r--r--include/configs/smdk6400.h7
-rw-r--r--include/configs/trab.h7
-rw-r--r--include/netdev.h1
17 files changed, 79 insertions, 59 deletions
diff --git a/include/configs/ADNPESC1.h b/include/configs/ADNPESC1.h
index b8afc17..2d4fc77 100644
--- a/include/configs/ADNPESC1.h
+++ b/include/configs/ADNPESC1.h
@@ -426,15 +426,17 @@
/********************************************/
/* !!! CS8900 is __not__ tested on NIOS !!! */
/********************************************/
-#define CONFIG_DRIVER_CS8900 /* Using CS8900 */
-#define CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* Using CS8900 */
+#define CONFIG_CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + \
+ CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
#if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32)
-#undef CS8900_BUS16
-#define CS8900_BUS32 1
+#undef CONFIG_CS8900_BUS16
+#define CONFIG_CS8900_BUS32
#else /* no */
-#define CS8900_BUS16 1
-#undef CS8900_BUS32
+#define CONFIG_CS8900_BUS16
+#undef CONFIG_CS8900_BUS32
#endif
#else
diff --git a/include/configs/DK1C20.h b/include/configs/DK1C20.h
index 45ff2f7..cdc488b 100644
--- a/include/configs/DK1C20.h
+++ b/include/configs/DK1C20.h
@@ -232,15 +232,17 @@
/********************************************/
/* !!! CS8900 is __not__ tested on NIOS !!! */
/********************************************/
-#define CONFIG_DRIVER_CS8900 /* Using CS8900 */
-#define CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* Using CS8900 */
+#define CONFIG_CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + \
+ CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
#if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32)
-#undef CS8900_BUS16
-#define CS8900_BUS32 1
+#undef CONFIG_CS8900_BUS16
+#define CONFIG_CS8900_BUS32
#else /* no */
-#define CS8900_BUS16 1
-#undef CS8900_BUS32
+#define CONFIG_CS8900_BUS16
+#undef CONFIG_CS8900_BUS32
#endif
#else
diff --git a/include/configs/DK1S10.h b/include/configs/DK1S10.h
index ae567a3..6e78861 100644
--- a/include/configs/DK1S10.h
+++ b/include/configs/DK1S10.h
@@ -249,15 +249,17 @@
/********************************************/
/* !!! CS8900 is __not__ tested on NIOS !!! */
/********************************************/
-#define CONFIG_DRIVER_CS8900 /* Using CS8900 */
-#define CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* Using CS8900 */
+#define CONFIG_CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + \
+ CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
#if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32)
-#undef CS8900_BUS16
-#define CS8900_BUS32 1
+#undef CONFIG_CS8900_BUS16
+#define CONFIG_CS8900_BUS32
#else /* no */
-#define CS8900_BUS16 1
-#undef CS8900_BUS32
+#define CONFIG_CS8900_BUS16
+#undef CONFIG_CS8900_BUS32
#endif
#else
diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index 6051480..618b7f0 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -108,9 +108,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x20000300
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x20000300
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
#define CONFIG_DRIVER_S3C24X0_I2C 1 /* we use the buildin I2C controller */
diff --git a/include/configs/armadillo.h b/include/configs/armadillo.h
index f7eec27..49ea3a1 100644
--- a/include/configs/armadillo.h
+++ b/include/configs/armadillo.h
@@ -56,10 +56,11 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x20000300 /* armadillo board */
-#define CS8900_BUS16 1
-#undef CS8900_BUS32
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x20000300 /* armadillo board */
+#define CONFIG_CS8900_BUS16
+#undef CONFIG_CS8900_BUS32
/*
* select serial console configuration
diff --git a/include/configs/csb226.h b/include/configs/csb226.h
index 12bab47..0661d65 100644
--- a/include/configs/csb226.h
+++ b/include/configs/csb226.h
@@ -150,9 +150,10 @@
/*
* Network chip
*/
-#define CONFIG_DRIVER_CS8900 1
-#define CS8900_BUS32 1
-#define CS8900_BASE 0x08000000
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900
+#define CONFIG_CS8900_BUS32
+#define CONFIG_CS8900_BASE 0x08000000
/*
* Stack sizes
diff --git a/include/configs/ep7312.h b/include/configs/ep7312.h
index 630fff3..e151faa 100644
--- a/include/configs/ep7312.h
+++ b/include/configs/ep7312.h
@@ -47,10 +47,11 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x20000000
-#define CS8900_BUS16 1
-#undef CS8900_BUS32
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x20000000
+#define CONFIG_CS8900_BUS16
+#undef CONFIG_CS8900_BUS32
/*
* select serial console configuration
diff --git a/include/configs/impa7.h b/include/configs/impa7.h
index c7001cc..fdfa022 100644
--- a/include/configs/impa7.h
+++ b/include/configs/impa7.h
@@ -47,9 +47,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x20000000
-#define CS8900_BUS32 1
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x20000000
+#define CONFIG_CS8900_BUS32
/*
* select serial console configuration
diff --git a/include/configs/lart.h b/include/configs/lart.h
index 5d6d460..2d3b369 100644
--- a/include/configs/lart.h
+++ b/include/configs/lart.h
@@ -47,9 +47,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x20008300
-#define CS8900_BUS16 1
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x20008300
+#define CONFIG_CS8900_BUS16
/*
* select serial console configuration
diff --git a/include/configs/mx1ads.h b/include/configs/mx1ads.h
index 12e567b..b2ffd3e 100644
--- a/include/configs/mx1ads.h
+++ b/include/configs/mx1ads.h
@@ -66,9 +66,10 @@
/*
* CS8900 Ethernet drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x15000300
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x15000300
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
/*
* select serial console configuration
diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h
index 363ea1b..ec1c905 100644
--- a/include/configs/mx31ads.h
+++ b/include/configs/mx31ads.h
@@ -109,9 +109,10 @@
"cp.b ${loadaddr} ${uboot_addr} ${filesize}; " \
"setenv filesize; saveenv\0"
-#define CONFIG_DRIVER_CS8900 1
-#define CS8900_BASE 0xb4020300
-#define CS8900_BUS16 1 /* follow the Linux driver */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900
+#define CONFIG_CS8900_BASE 0xb4020300
+#define CONFIG_CS8900_BUS16 1 /* follow the Linux driver */
/*
* The MX31ADS board seems to have a hardware "peculiarity" confirmed under
diff --git a/include/configs/sbc2410x.h b/include/configs/sbc2410x.h
index f3dc7fe..f2ea926 100644
--- a/include/configs/sbc2410x.h
+++ b/include/configs/sbc2410x.h
@@ -63,9 +63,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x19000300
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x19000300
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
/*
* select serial console configuration
diff --git a/include/configs/smdk2400.h b/include/configs/smdk2400.h
index b712db4..c234177 100644
--- a/include/configs/smdk2400.h
+++ b/include/configs/smdk2400.h
@@ -56,9 +56,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x07000300 /* agrees with WIN CE PA */
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x07000300 /* agrees with WIN CE PA */
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
/*
* select serial console configuration
diff --git a/include/configs/smdk2410.h b/include/configs/smdk2410.h
index a473278..d340098 100644
--- a/include/configs/smdk2410.h
+++ b/include/configs/smdk2410.h
@@ -53,9 +53,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x19000300
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x19000300
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
/*
* select serial console configuration
diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h
index ddc8e71..f6e1221 100644
--- a/include/configs/smdk6400.h
+++ b/include/configs/smdk6400.h
@@ -74,9 +74,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x18800300
-#define CS8900_BUS16 1 /* follow the Linux driver */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x18800300
+#define CONFIG_CS8900_BUS16 /* follow the Linux driver */
/*
* select serial console configuration
diff --git a/include/configs/trab.h b/include/configs/trab.h
index 7687ee6..43c191b 100644
--- a/include/configs/trab.h
+++ b/include/configs/trab.h
@@ -99,9 +99,10 @@
/*
* Hardware drivers
*/
-#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
-#define CS8900_BASE 0x07000300 /* agrees with WIN CE PA */
-#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
+#define CONFIG_NET_MULTI
+#define CONFIG_CS8900 /* we have a CS8900 on-board */
+#define CONFIG_CS8900_BASE 0x07000300 /* agrees with WIN CE PA */
+#define CONFIG_CS8900_BUS16 /* the Linux driver does accesses as shorts */
#define CONFIG_DRIVER_S3C24X0_I2C 1 /* we use the buildin I2C controller */
diff --git a/include/netdev.h b/include/netdev.h
index 50329a3..a50ec67 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -43,6 +43,7 @@ int cpu_eth_init(bd_t *bis);
/* Driver initialization prototypes */
int au1x00_enet_initialize(bd_t*);
int bfin_EMAC_initialize(bd_t *bis);
+int cs8900_initialize(u8 dev_num, int base_addr);
int dc21x4x_initialize(bd_t *bis);
int davinci_emac_initialize(void);
int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr);