[En-Nut-Discussion] SAM7x EMAC Init

Nicolas Moreau ngbmoreau at yahoo.com.au
Mon Jun 11 09:26:07 CEST 2007


Hi

The emac init code the for sam7x won't succeed without a cable plugged in.
This is a real worry, Is there a particular reason for this behavior ?

Sound this auto negotiation link be in the RX thread instead  ?

The offending code is in at91_emac.code:

  /* Wait for auto negotiation completed. */
        phy_inw(NIC_PHY_BMSR);  /* Discard previously latched status. */
        while (--tmo) {
            if (phy_inw(NIC_PHY_BMSR) & NIC_PHY_BMSR_ANCOMPL) {
                break;
            }
        }
        /* Return error on link timeout. */
        if (tmo == 0) {
            outr(EMAC_NCR, inr(EMAC_NCR) & ~EMAC_MPE);
            return -1;
        }


Nic



More information about the En-Nut-Discussion mailing list