summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-08-25 23:03:22 +0200
committerWolfgang Denk <wd@denx.de>2009-08-25 23:03:22 +0200
commitd3870bd2d832ea2048b7cb2bbb9d642585b137cf (patch)
tree73051933cff1366b6ec7ce2da6bcd049875a0905 /board
parent68ccfa482be0c7e4aa18285aceb214ed7f5d8e89 (diff)
parent0d071cdd782e917b43e04869843df31670231ffd (diff)
Merge branch 'next' of git://git.denx.de/u-boot-net into next
Diffstat (limited to 'board')
-rw-r--r--board/altera/dk1c20/dk1c20.c12
-rw-r--r--board/altera/dk1s10/dk1s10.c12
-rw-r--r--board/armadillo/armadillo.c12
-rw-r--r--board/csb226/csb226.c12
-rw-r--r--board/ep7312/ep7312.c12
-rw-r--r--board/freescale/mx31ads/mx31ads.c12
-rw-r--r--board/impa7/impa7.c12
-rw-r--r--board/lart/lart.c12
-rw-r--r--board/mpl/vcma9/cmd_vcma9.c28
-rw-r--r--board/mpl/vcma9/vcma9.c12
-rw-r--r--board/mx1ads/mx1ads.c12
-rw-r--r--board/samsung/smdk2400/smdk2400.c12
-rw-r--r--board/samsung/smdk2410/smdk2410.c12
-rw-r--r--board/samsung/smdk6400/smdk6400.c12
-rw-r--r--board/sbc2410x/sbc2410x.c12
-rw-r--r--board/ssv/adnpesc1/adnpesc1.c12
-rw-r--r--board/trab/trab.c12
17 files changed, 210 insertions, 10 deletions
diff --git a/board/altera/dk1c20/dk1c20.c b/board/altera/dk1c20/dk1c20.c
index 11c19b7eedb..0bcaa4fd147 100644
--- a/board/altera/dk1c20/dk1c20.c
+++ b/board/altera/dk1c20/dk1c20.c
@@ -25,6 +25,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <nios-io.h>
#if defined(CONFIG_SEVENSEG)
#include "../common/sevenseg.h"
@@ -79,3 +80,14 @@ int ide_preinit (void)
return 0;
}
#endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/altera/dk1s10/dk1s10.c b/board/altera/dk1s10/dk1s10.c
index 64d591e714e..fb96501da21 100644
--- a/board/altera/dk1s10/dk1s10.c
+++ b/board/altera/dk1s10/dk1s10.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <netdev.h>
#if defined(CONFIG_SEVENSEG)
#include "../common/sevenseg.h"
#endif
@@ -58,3 +59,14 @@ phys_size_t initdram (int board_type)
{
return (0);
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/armadillo/armadillo.c b/board/armadillo/armadillo.c
index ca5bd1d1640..a825144c5c6 100644
--- a/board/armadillo/armadillo.c
+++ b/board/armadillo/armadillo.c
@@ -26,6 +26,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <clps7111.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -58,3 +59,14 @@ int dram_init (void)
return (0);
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/csb226/csb226.c b/board/csb226/csb226.c
index 80caf8b464e..0a6c13dd29b 100644
--- a/board/csb226/csb226.c
+++ b/board/csb226/csb226.c
@@ -24,6 +24,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <asm/arch/pxa-regs.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -151,3 +152,14 @@ void show_boot_progress (int status)
return;
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/ep7312/ep7312.c b/board/ep7312/ep7312.c
index 6968a5dbdd1..8ed14ad583d 100644
--- a/board/ep7312/ep7312.c
+++ b/board/ep7312/ep7312.c
@@ -23,6 +23,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <clps7111.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -52,3 +53,14 @@ int dram_init (void)
return (0);
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/freescale/mx31ads/mx31ads.c b/board/freescale/mx31ads/mx31ads.c
index c24c47c57f8..bc25c6deb5c 100644
--- a/board/freescale/mx31ads/mx31ads.c
+++ b/board/freescale/mx31ads/mx31ads.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <asm/io.h>
#include <asm/arch/mx31.h>
#include <asm/arch/mx31-regs.h>
@@ -104,3 +105,14 @@ int checkboard (void)
printf("Board: MX31ADS\n");
return 0;
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/impa7/impa7.c b/board/impa7/impa7.c
index 3230dd48f07..205b1b31dde 100644
--- a/board/impa7/impa7.c
+++ b/board/impa7/impa7.c
@@ -23,6 +23,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <clps7111.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -57,3 +58,14 @@ int dram_init (void)
return (0);
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/lart/lart.c b/board/lart/lart.c
index 8d534c8e673..a0b459f2f21 100644
--- a/board/lart/lart.c
+++ b/board/lart/lart.c
@@ -23,6 +23,7 @@
*/
#include <common.h>
+#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -62,3 +63,14 @@ int dram_init (void)
return (0);
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/mpl/vcma9/cmd_vcma9.c b/board/mpl/vcma9/cmd_vcma9.c
index 01607743952..0ee959507f7 100644
--- a/board/mpl/vcma9/cmd_vcma9.c
+++ b/board/mpl/vcma9/cmd_vcma9.c
@@ -31,7 +31,7 @@
#include "vcma9.h"
#include "../common/common_util.h"
-#if defined(CONFIG_DRIVER_CS8900)
+#if defined(CONFIG_CS8900)
#include <../drivers/net/cs8900.h>
static uchar cs8900_chksum(ushort data)
@@ -56,25 +56,33 @@ extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
+ struct eth_device *dev;
+ char cs8900_name[10];
if (strcmp(argv[1], "info") == 0)
{
print_vcma9_info();
return 0;
}
-#if defined(CONFIG_DRIVER_CS8900)
+#if defined(CONFIG_CS8900)
if (strcmp(argv[1], "cs8900") == 0) {
+ sprintf(cs8900_name, "%s-0", CS8900_DRIVERNAME);
+ dev = eth_get_dev_by_name(cs8900_name);
+ if (!dev) {
+ printf("Couldn't find CS8900 driver");
+ return 0;
+ }
if (strcmp(argv[2], "read") == 0) {
uchar addr; ushort data;
addr = simple_strtoul(argv[3], NULL, 16);
- cs8900_e2prom_read(addr, &data);
+ cs8900_e2prom_read(dev, addr, &data);
printf("0x%2.2X: 0x%4.4X\n", addr, data);
} else if (strcmp(argv[2], "write") == 0) {
uchar addr; ushort data;
addr = simple_strtoul(argv[3], NULL, 16);
data = simple_strtoul(argv[4], NULL, 16);
- cs8900_e2prom_write(addr, data);
+ cs8900_e2prom_write(dev, addr, data);
} else if (strcmp(argv[2], "setaddr") == 0) {
uchar addr, i, csum; ushort data;
uchar ethaddr[6];
@@ -83,22 +91,22 @@ int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (eth_getenv_enetaddr("ethaddr", ethaddr)) {
addr = 1;
data = 0x2158;
- cs8900_e2prom_write(addr, data);
+ cs8900_e2prom_write(dev, addr, data);
csum = cs8900_chksum(data);
addr++;
for (i = 0; i < 6; i+=2) {
data = ethaddr[i+1] << 8 |
ethaddr[i];
- cs8900_e2prom_write(addr, data);
+ cs8900_e2prom_write(dev, addr, data);
csum += cs8900_chksum(data);
addr++;
}
/* calculate header link byte */
data = 0xA100 | (addr * 2);
- cs8900_e2prom_write(0, data);
+ cs8900_e2prom_write(dev, 0, data);
csum += cs8900_chksum(data);
/* write checksum word */
- cs8900_e2prom_write(addr, (0 - csum) << 8);
+ cs8900_e2prom_write(dev, addr, (0 - csum) << 8);
} else {
puts("\nplease defined 'ethaddr'\n");
}
@@ -106,12 +114,12 @@ int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
uchar addr = 0, endaddr, csum; ushort data;
puts("Dump of CS8900 config device: ");
- cs8900_e2prom_read(addr, &data);
+ cs8900_e2prom_read(dev, addr, &data);
if ((data & 0xE000) == 0xA000) {
endaddr = (data & 0x00FF) / 2;
csum = cs8900_chksum(data);
for (addr = 1; addr <= endaddr; addr++) {
- cs8900_e2prom_read(addr, &data);
+ cs8900_e2prom_read(dev, addr, &data);
printf("\n0x%2.2X: 0x%4.4X", addr, data);
csum += cs8900_chksum(data);
}
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index 2b3fad2513e..3216d6347dc 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -26,6 +26,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <s3c2410.h>
#include <stdio_dev.h>
#include <i2c.h>
@@ -349,3 +350,14 @@ void print_vcma9_info(void)
Show_VCMA9_Info(s, &s[6]);
}
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/mx1ads/mx1ads.c b/board/mx1ads/mx1ads.c
index ba152e2e886..f8ce2108c1c 100644
--- a/board/mx1ads/mx1ads.c
+++ b/board/mx1ads/mx1ads.c
@@ -24,6 +24,7 @@
*/
#include <common.h>
+#include <netdev.h>
/*#include <mc9328.h>*/
#include <asm/arch/imx-regs.h>
@@ -167,3 +168,14 @@ int dram_init (void)
return 0;
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/samsung/smdk2400/smdk2400.c b/board/samsung/smdk2400/smdk2400.c
index 0b820706b23..2c47063e95e 100644
--- a/board/samsung/smdk2400/smdk2400.c
+++ b/board/samsung/smdk2400/smdk2400.c
@@ -26,6 +26,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <s3c2400.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -110,3 +111,14 @@ static int key_pressed(void)
return rc;
}
#endif /* CONFIG_MODEM_SUPPORT */
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/samsung/smdk2410/smdk2410.c b/board/samsung/smdk2410/smdk2410.c
index 802348d2369..25c38e67e9d 100644
--- a/board/samsung/smdk2410/smdk2410.c
+++ b/board/samsung/smdk2410/smdk2410.c
@@ -26,6 +26,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <s3c2410.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -121,3 +122,14 @@ int dram_init (void)
return 0;
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
index 52cd174a066..561c0c83115 100644
--- a/board/samsung/smdk6400/smdk6400.c
+++ b/board/samsung/smdk6400/smdk6400.c
@@ -29,6 +29,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <s3c6400.h>
/* ------------------------------------------------------------------------- */
@@ -117,3 +118,14 @@ ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t *info)
} else
return 0;
}
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/sbc2410x/sbc2410x.c b/board/sbc2410x/sbc2410x.c
index 6c894a3869e..62768503ad5 100644
--- a/board/sbc2410x/sbc2410x.c
+++ b/board/sbc2410x/sbc2410x.c
@@ -29,6 +29,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <s3c2410.h>
#if defined(CONFIG_CMD_NAND)
@@ -178,3 +179,14 @@ void nand_init(void)
printf ("%4lu MB\n", nand_probe((ulong)nand) >> 20);
}
#endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/ssv/adnpesc1/adnpesc1.c b/board/ssv/adnpesc1/adnpesc1.c
index 9d32741499e..72810d036ae 100644
--- a/board/ssv/adnpesc1/adnpesc1.c
+++ b/board/ssv/adnpesc1/adnpesc1.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <nios-io.h>
#include <spi.h>
@@ -100,3 +101,14 @@ int post_hotkeys_pressed(void)
return 0; /* No hotkeys supported */
}
#endif /* CONFIG_POST */
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif
diff --git a/board/trab/trab.c b/board/trab/trab.c
index ddf6abf7b4c..2dccd87677c 100644
--- a/board/trab/trab.c
+++ b/board/trab/trab.c
@@ -24,6 +24,7 @@
/* #define DEBUG */
#include <common.h>
+#include <netdev.h>
#include <malloc.h>
#include <s3c2400.h>
#include <command.h>
@@ -420,3 +421,14 @@ static void tsc2000_set_brightness(void)
tsc2000_write(0, 0xb, br & 0xff);
}
#endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_CS8900
+ rc = cs8900_initialize(0, CONFIG_CS8900_BASE);
+#endif
+ return rc;
+}
+#endif