Add support for fetching MAC address from flash.
Signed-off-by: Atle Nissestad <[EMAIL PROTECTED]>
diff --git a/linux-2.6.x/drivers/net/dm9000.c b/linux-2.6.x/drivers/net/dm9000.c
index 738aa59..4a91e0b 100644
--- a/linux-2.6.x/drivers/net/dm9000.c
+++ b/linux-2.6.x/drivers/net/dm9000.c
@@ -577,6 +577,12 @@ dm9000_probe(struct platform_device *pdev)
db->mii.mdio_read = dm9000_phy_read;
db->mii.mdio_write = dm9000_phy_write;
+#ifdef CONFIG_EXCALIBUR
+ {
+ extern unsigned char *excalibur_enet_hwaddr;
+ memcpy(ndev->dev_addr, excalibur_enet_hwaddr, 6);
+ }
+#else
/* Read SROM content */
for (i = 0; i < 64; i++)
((u16 *) db->srom)[i] = read_srom_word(db, i);
diff --git a/linux-2.6.x/drivers/net/smc911x.c
b/linux-2.6.x/drivers/net/smc911x.c
index db43e42..69638ee 100644
--- a/linux-2.6.x/drivers/net/smc911x.c
+++ b/linux-2.6.x/drivers/net/smc911x.c
@@ -2017,6 +2017,12 @@ static int __init smc911x_probe(struct net_device *dev,
unsigned long ioaddr)
/* Get the MAC address */
SMC_GET_MAC_ADDR(dev->dev_addr);
+#ifdef CONFIG_EXCALIBUR
+ {
+ extern unsigned char *excalibur_enet_hwaddr;
+ memcpy(dev->dev_addr, excalibur_enet_hwaddr, 6);
+ }
+#endif
/* now, reset the chip, and put it into a known state */
smc911x_reset(dev);
diff --git a/linux-2.6.x/drivers/net/smc91x.c b/linux-2.6.x/drivers/net/smc91x.c
index 01cc3c7..a10c5f8 100644
--- a/linux-2.6.x/drivers/net/smc91x.c
+++ b/linux-2.6.x/drivers/net/smc91x.c
@@ -1918,6 +1918,12 @@ static int __init smc_probe(struct net_device *dev, void
__iomem *ioaddr)
/* Get the MAC address */
SMC_SELECT_BANK(1);
SMC_GET_MAC_ADDR(dev->dev_addr);
+#ifdef CONFIG_EXCALIBUR
+ {
+ extern unsigned char *excalibur_enet_hwaddr;
+ memcpy(dev->dev_addr, excalibur_enet_hwaddr, 6);
+ }
+#endif
/* now, reset the chip, and put it into a known state */
smc_reset(dev);
--
1.5.3.2
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev