summaryrefslogtreecommitdiffstats
path: root/board/renesas
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2009-07-20 22:01:11 -0700
committerBen Warren <biggerbadderben@gmail.com>2009-07-22 22:53:44 -0700
commit736fead8fdbf8a8407048bebc373cd551d01ec98 (patch)
tree60307d25c8dd18cbdf7e3b3807f924b838cee9fb /board/renesas
parent3bd0a877b74b9c005ae7cb892480ccedfa308c20 (diff)
downloadtalos-obmc-uboot-736fead8fdbf8a8407048bebc373cd551d01ec98.tar.gz
talos-obmc-uboot-736fead8fdbf8a8407048bebc373cd551d01ec98.zip
Convert SMC911X Ethernet driver to CONFIG_NET_MULTI API
All in-tree boards that use this controller have CONFIG_NET_MULTI added Also: - changed CONFIG_DRIVER_SMC911X* to CONFIG_SMC911X* - cleaned up line lengths - modified all boards that override weak function in this driver - added Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Tested-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'board/renesas')
-rw-r--r--board/renesas/ap325rxa/ap325rxa.c10
-rw-r--r--board/renesas/rsk7203/rsk7203.c17
2 files changed, 24 insertions, 3 deletions
diff --git a/board/renesas/ap325rxa/ap325rxa.c b/board/renesas/ap325rxa/ap325rxa.c
index 9f1112a436..be919f5454 100644
--- a/board/renesas/ap325rxa/ap325rxa.c
+++ b/board/renesas/ap325rxa/ap325rxa.c
@@ -19,6 +19,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <asm/io.h>
#include <asm/processor.h>
@@ -160,3 +161,12 @@ void ide_set_reset(int idereset)
udelay(FPGA_NAND_RST_WAIT);
outw(FPGA_NAND_INIT, FPGA_NAND_CTL);
}
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_SMC911X
+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+ return rc;
+}
diff --git a/board/renesas/rsk7203/rsk7203.c b/board/renesas/rsk7203/rsk7203.c
index 2cbd45e043..2b85799869 100644
--- a/board/renesas/rsk7203/rsk7203.c
+++ b/board/renesas/rsk7203/rsk7203.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
+#include <netdev.h>
#include <asm/io.h>
#include <asm/processor.h>
@@ -57,15 +58,25 @@ void led_set_state(unsigned short value)
* And this has problem by FIFO access only. pkt_data_pull/pkt_data_push
* functions necessary to solve this problem.
*/
-u32 pkt_data_pull(u32 addr)
+u32 pkt_data_pull(struct eth_device *dev, u32 addr)
{
- volatile u16 *addr_16 = (u16 *)addr;
+ volatile u16 *addr_16 = (u16 *)(dev->iobase + addr);
return (u32)((swab16(*addr_16) << 16) & 0xFFFF0000)\
| swab16(*(addr_16 + 1));
}
-void pkt_data_push(u32 addr, u32 val)
+void pkt_data_push(struct eth_device *dev, u32 addr, u32 val)
{
+ addr += dev->iobase;
*(volatile u16 *)(addr + 2) = swab16((u16)val);
*(volatile u16 *)(addr) = swab16((u16)(val >> 16));
}
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_SMC911X
+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+ return rc;
+}
OpenPOWER on IntegriCloud