[U-Boot-Users] [PATCH] Implement general ULi 526x Ethernet driver support in U-boot

Timur Tabi timur at freescale.com
Wed Nov 14 17:47:56 CET 2007


Timur Tabi wrote:

> BTW, where is the code that programs the MAC address *into* the IDT/SROM?  All 
> we have is code that reads *from* the IDT/SROM.  On the 8610, the MAC address is 
> stored in I2C EEPROM (address 0x57), and so U-Boot will need to copy that into 
> the IDT/SROM *before* this driver runs.

I think I see the problem.  The comment in set_mac_addr() is wrong and confused me:

+static void set_mac_addr(struct eth_device *dev)
+{
+	int i;
+	u16 addr;
+	struct uli526x_board_info *db = dev->priv;
+	outl(0x10000, db->ioaddr + DCR0);	/* Diagnosis mode */
+	/* Reset dianostic pointer port */
+	outl(0x1c0, db->ioaddr + DCR13);
+	outl(0, db->ioaddr + DCR14);	/* Clear reset port */
+	outl(0x10, db->ioaddr + DCR14);	/* Reset ID Table pointer */
+	outl(0, db->ioaddr + DCR14);	/* Clear reset port */
+	outl(0, db->ioaddr + DCR13);	/* Clear CR13 */
+	/* Select ID Table access port */
+	outl(0x1b0, db->ioaddr + DCR13);
+	/* Read MAC address from CR14 */

This should say "Write MAC address to CR14"

-- 
Timur Tabi
Linux kernel developer at Freescale




More information about the U-Boot mailing list