]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net:kirkwood_egiga.c: MAC addresses programming using write_hwaddr
authorPrafulla Wadaskar <prafulla@marvell.com>
Tue, 6 Apr 2010 16:51:33 +0000 (22:21 +0530)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 3 May 2010 21:52:49 +0000 (14:52 -0700)
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>
drivers/net/kirkwood_egiga.c

index dd711e4a105f4b75253eacf06fd29b2b2f4d7f5b..932792e364a25a9c7e9b152ef29b65cbcb4ff1c2 100644 (file)
@@ -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);