diff options
-rw-r--r-- | os/io/platforms/AT91SAM7X/mii_lld.c | 9 | ||||
-rw-r--r-- | os/io/platforms/AT91SAM7X/mii_lld.h | 15 |
2 files changed, 7 insertions, 17 deletions
diff --git a/os/io/platforms/AT91SAM7X/mii_lld.c b/os/io/platforms/AT91SAM7X/mii_lld.c index 4d69adc43..c4f3ac3eb 100644 --- a/os/io/platforms/AT91SAM7X/mii_lld.c +++ b/os/io/platforms/AT91SAM7X/mii_lld.c @@ -46,15 +46,6 @@ void mii_lld_reset(MACDriver *macp) { /*
* Disables the pullups on all the pins that are latched on reset by the PHY.
- * The status latched into the PHY is:
- * PHYADDR = 00001
- * PCS_LPBK = 0 (disabled)
- * ISOLATE = 0 (disabled)
- * RMIISEL = 0 (MII mode)
- * RMIIBTB = 0 (BTB mode disabled)
- * SPEED = 1 (100mbps)
- * DUPLEX = 1 (full duplex)
- * ANEG_EN = 1 (auto negotiation enabled)
*/
AT91C_BASE_PIOB->PIO_PPUDR = PHY_LATCHED_PINS;
diff --git a/os/io/platforms/AT91SAM7X/mii_lld.h b/os/io/platforms/AT91SAM7X/mii_lld.h index 948999bb1..331e05d14 100644 --- a/os/io/platforms/AT91SAM7X/mii_lld.h +++ b/os/io/platforms/AT91SAM7X/mii_lld.h @@ -51,8 +51,7 @@ /**
* @brief Pins latched by the PHY at reset. */
-#if (PHY_HARDWARE == PHY_MICREL_KS8721)
-
+#if PHY_HARDWARE == PHY_MICREL_KS8721
#define PHY_ADDRESS 1
#define PHY_ID MII_KS8721_ID
#define PHY_LATCHED_PINS (AT91C_PB4_ECRS | AT91C_PB5_ERX0 | \
@@ -60,15 +59,15 @@ AT91C_PB13_ERX2 | AT91C_PB14_ERX3 | \
AT91C_PB15_ERXDV_ECRSDV | AT91C_PB16_ECOL | \
AT91C_PIO_PB26)
-#elif (PHY_HARDWARE == PHY_DAVICOM_9161)
+#elif PHY_HARDWARE == PHY_DAVICOM_9161
#define PHY_ADDRESS 0
#define PHY_ID MII_DM9161_ID
-#define PHY_LATCHED_PINS (AT91C_PB4_ECRS | AT91C_PB5_ERX0 | \
- AT91C_PB6_ERX1 | AT91C_PB7_ERXER | \
- AT91C_PB13_ERX2 | AT91C_PB14_ERX3 | \
- AT91C_PB15_ERXDV_ECRSDV | AT91C_PB16_ECOL | \
- AT91C_PB17_ERXCK)
+#define PHY_LATCHED_PINS (AT91C_PB0_ETXCK_EREFCK | AT91C_PB4_ECRS | \
+ AT91C_PB5_ERX0 | AT91C_PB6_ERX1 | \
+ AT91C_PB7_ERXER | AT91C_PB13_ERX2 | \
+ AT91C_PB14_ERX3 | AT91C_PB15_ERXDV_ECRSDV | \
+ AT91C_PB16_ECOL | AT91C_PB17_ERXCK)
#endif /* PHY_HARDWARE */
/*===========================================================================*/
|