9
0
Fork 0

macb: add support for board specific get_ethaddr function

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Hubert Feurstein 2011-06-16 15:55:56 +02:00 committed by Sascha Hauer
parent 21536365bb
commit cdc578325a
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#ifndef __ASM_ARCH_BOARD_H
#define __ASM_ARCH_BOARD_H
#include <net.h>
#include <linux/mtd/mtd.h>
void atmel_nand_load_image(void *dest, int size, int pagesize, int blocksize);
@ -47,6 +48,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
struct at91_ether_platform_data {
unsigned int flags;
int phy_addr;
int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
};
void at91_add_device_eth(struct at91_ether_platform_data *data);

View File

@ -431,7 +431,7 @@ static int macb_probe(struct device_d *dev)
edev->send = macb_send;
edev->recv = macb_recv;
edev->halt = macb_halt;
edev->get_ethaddr = macb_get_ethaddr;
edev->get_ethaddr = pdata->get_ethaddr ? pdata->get_ethaddr : macb_get_ethaddr;
edev->set_ethaddr = macb_set_ethaddr;
macb->miidev.read = macb_phy_read;