summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorPrafulla Wadaskar <prafulla@marvell.com>2010-04-06 22:21:33 +0530
committerBen Warren <biggerbadderben@gmail.com>2010-05-03 14:52:49 -0700
commitb5ce63ed12b4cd81d211621aca0c222b20d2a691 (patch)
tree34b7a467003259602a445698cc6921674ed55462 /drivers/net
parentecee9324d73555e744593f3e0d387bec4c566f55 (diff)
downloadu-boot-imx-b5ce63ed12b4cd81d211621aca0c222b20d2a691.zip
u-boot-imx-b5ce63ed12b4cd81d211621aca0c222b20d2a691.tar.gz
u-boot-imx-b5ce63ed12b4cd81d211621aca0c222b20d2a691.tar.bz2
net:kirkwood_egiga.c: MAC addresses programming using write_hwaddr
Added a new function kwgbe_write_hwaddr for programming egiga controller's hardware address. This function will be called for each egiga port being used Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/kirkwood_egiga.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index dd711e4..932792e 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -498,6 +498,16 @@ static int kwgbe_halt(struct eth_device *dev)
return 0;
}
+static int kwgbe_write_hwaddr(struct eth_device *dev)
+{
+ struct kwgbe_device *dkwgbe = to_dkwgbe(dev);
+ struct kwgbe_registers *regs = dkwgbe->regs;
+
+ /* Programs net device MAC address after initialization */
+ port_uc_addr_set(regs, dkwgbe->dev.enetaddr);
+ return 0;
+}
+
static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,
int datasize)
{
@@ -694,6 +704,7 @@ int kirkwood_egiga_initialize(bd_t * bis)
dev->halt = (void *)kwgbe_halt;
dev->send = (void *)kwgbe_send;
dev->recv = (void *)kwgbe_recv;
+ dev->write_hwaddr = (void *)kwgbe_write_hwaddr;
eth_register(dev);