X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Feth_sam3.c;h=f93275db44304e8b66bde6a4cff8bdff6511ed11;hb=d369c385f36aae74d203f6c40ee81c80d9032bbc;hp=0247f6181e26fe1c2065e16a3d81dd5051014a99;hpb=f7246e13fc639463fd4084fd0d3b851d4a446cb2;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/eth_sam3.c b/bertos/cpu/cortex-m3/drv/eth_sam3.c index 0247f618..f93275db 100644 --- a/bertos/cpu/cortex-m3/drv/eth_sam3.c +++ b/bertos/cpu/cortex-m3/drv/eth_sam3.c @@ -72,13 +72,6 @@ #define EMAC_RX_INTS (BV(EMAC_RCOMP) | BV(EMAC_ROVR) | BV(EMAC_RXUBR)) #define EMAC_TX_INTS (BV(EMAC_TCOMP) | BV(EMAC_TXUBR) | BV(EMAC_RLEX)) -/* - * MAC address configuration (please change this in your project!). - * - * TODO: make this paramater user-configurable from the Wizard. - */ -const uint8_t mac_addr[] = { 0x00, 0x45, 0x56, 0x78, 0x9a, 0xbc }; - /* Silent Doxygen bug... */ #ifndef __doxygen__ /* @@ -241,13 +234,8 @@ static int emac_reset(void) pmc_periphEnable(PIOD_ID); pmc_periphEnable(EMAC_ID); - // Disable TESTMODE and RMII - PIOC_PUDR = BV(PHY_RXDV_TESTMODE_BIT); - - // Disable PHY power down. - PIOD_PER = BV(PHY_PWRDN_BIT); - PIOD_OER = BV(PHY_PWRDN_BIT); - PIOD_CODR = BV(PHY_PWRDN_BIT); + // Disable TESTMODE + PIOB_PUDR = BV(PHY_RXDV_TESTMODE_BIT); #endif // Toggle external hardware reset pin. @@ -269,9 +257,6 @@ static int emac_reset(void) PIO_PERIPH_SEL(PIOB_BASE, PHY_MII_PINS_PORTB, PIO_PERIPH_A); PIOB_PDR = PHY_MII_PINS_PORTB; - PIO_PERIPH_SEL(PIOC_BASE, PHY_MII_PINS_PORTC, PIO_PERIPH_A); - PIOC_PDR = PHY_MII_PINS_PORTC; - // Enable receive, transmit clocks and RMII mode. EMAC_USRIO = BV(EMAC_CLKEN) | BV(EMAC_RMII); #endif