git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3981 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2012-02-25 13:54:09 +00:00
parent 2bfbe2d144
commit ada8449960
1 changed files with 6 additions and 10 deletions

View File

@ -296,10 +296,10 @@ void mac_lld_start(MACDriver *macp) {
/* PHY in power up mode.*/ /* PHY in power up mode.*/
mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN); mii_write(macp, MII_BMCR, mii_read(macp, MII_BMCR) & ~BMCR_PDOWN);
/* MAC configuration: /* MAC configuration.*/
ETH_MACFFR_SAF - Source address filter. Broadcast frames are not ETH->MACFFR = 0;
filtered.*/ ETH->MACFCR = 0;
ETH->MACFFR = ETH_MACFFR_SAF; ETH->MACVLANTR = 0;
/* MAC address setup.*/ /* MAC address setup.*/
if (macp->config->mac_address == NULL) if (macp->config->mac_address == NULL)
@ -307,14 +307,10 @@ void mac_lld_start(MACDriver *macp) {
else else
mac_lld_set_address(macp->config->mac_address); mac_lld_set_address(macp->config->mac_address);
/* MAC flow control not used, VLAN not used.*/
ETH->MACFCR = 0;
ETH->MACVLANTR = 0;
/* Transmitter and receiver enabled. /* Transmitter and receiver enabled.
Note that the complete setup of the MAC is performed when the link Note that the complete setup of the MAC is performed when the link
status is detected.*/ status is detected.*/
ETH->MACCR = ETH_MACCR_RE | ETH_MACCR_TE; ETH->MACCR = ETH_MACCR_IPCO | ETH_MACCR_RE | ETH_MACCR_TE;
/* DMA configuration: /* DMA configuration:
Descriptor chains pointers.*/ Descriptor chains pointers.*/
@ -604,7 +600,7 @@ bool_t mac_lld_poll_link_status(MACDriver *macp) {
if (bmcr & BMCR_ANENABLE) { if (bmcr & BMCR_ANENABLE) {
uint32_t lpa; uint32_t lpa;
/* Auto-nogotiation enabled, checks the LPA register.*/ /* Auto-negotiation enabled, checks the LPA register.*/
lpa = mii_read(macp, MII_LPA); lpa = mii_read(macp, MII_LPA);
/* Check on link speed.*/ /* Check on link speed.*/