[U-Boot] [PATCH] Olimex SAM9-L9260 board support

Cristian Birsan cristian.birsan at gmail.com
Wed Oct 8 00:05:39 CEST 2008


Dear all,

In the previous patch i removed the code from the section below.

 >> +#ifdef CONFIG_RESET_PHY_R
 >> +void reset_phy(void)
 >> +{
 >> +#ifdef CONFIG_MACB
 >> +    /*
 >> +     * Initialize ethernet HW addr prior to starting Linux,
 >> +     * needed for nfsroot
 >> +     */
 >> +    eth_init(gd->bd);
 >> +#endif
 >
 > Please do NOT  do  this.  It's  a  violation  of  the  U-Boot  design
 > principles,  which  clearly  say that only such periphereals that are
 > actually being used by U-Boot shall be initialized, and even if  they
 > are being used, these shall be deactivated after use.
 >
 > Carelessly leaving ports or devices in an initialized stated has been
 > the source for problems too many times before.
 >
 > Don't do that.

The u-boot works but when I try to use nfs as root filesystem i encounter the following issue:

.............
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)
eth0: attached PHY driver [KS8721BL] (mii_bus:phy_addr=ffffffff:01, irq=-1)
.............

 From previous messages i understand that the MAC is set to 00:00:00:00:00:00 which is bad.

IP-Config: Failed to open eth0

I used again setenv ethaddr 00:04:25:12:34:56 in u-boot. After saveenv and reboot i used md command to display the EMAC 0xFFFC4000 (named MACB in the driver )
registers

U-Boot> md 0xfff4c000
fff4c000: 00000000 00000000 00000000 00000000    ................
fff4c010: 00000000 00000000 00000000 00000000    ................
fff4c020: 00000000 00000000 00000000 00000000    ................
fff4c030: 00000000 00000000 00000000 00000000    ................
fff4c040: 00000000 00000000 00000000 00000000    ................
fff4c050: 00000000 00000000 00000000 00000000    ................
fff4c060: 00000000 00000000 00000000 00000000    ................
fff4c070: 00000000 00000000 00000000 00000000    ................
fff4c080: 00000000 00000000 00000000 00000000    ................
fff4c090: 00000000 00000000 00000000 00000000    ................
fff4c0a0: 00000000 00000000 00000000 00000000    ................
fff4c0b0: 00000000 00000000 00000000 00000000    ................
fff4c0c0: 00000000 00000000 00000000 00000000    ................
fff4c0d0: 00000000 00000000 00000000 00000000    ................
fff4c0e0: 00000000 00000000 00000000 00004000    ............. at ..
fff4c0f0: 53504932 20202020 00010154 00000190    2IPS    T.......

Offset 0x98 Specific Address 1 Bottom Register EMAC_SA1B Read-write
Offset 0x9C Specific Address 1 Top Register    EMAC_SA1T Read-write

The register EMAC_SA1T and EMAC_SA1B coresponding to top and bottom of the MAC address are 0

Nfs works only with the ugly code that was removed.

I'm spinning in a circle :(

Please send me any suggestion.

Best regards,
Cristian Birsan


More information about the U-Boot mailing list