[PATCH 3/3] net ep93xx mii: do not supress MII preamble transmission

Alexander Kurz akurz at blala.de
Sun Feb 21 10:06:30 PST 2016


PHY like the ks8721bl used on the edb9302 and similare evaluation boards
will initially not respond to the ep93xx_phy_read/write functions when
the MII-preamble is supressed. The supression is switched on by default
and must be switched off by clearing bit 8, see also EP93xx Users guide.
Removing the orphaned MII_SUPPRESS_PREAMBLE config option, note:
setting MII_SUPPRESS_PREAMBLE would actually enable the preamble transmission.

Signed-off-by: Alexander Kurz <akurz at blala.de>
---
 drivers/net/ep93xx.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ep93xx.c b/drivers/net/ep93xx.c
index d2458eb..226a3c6 100644
--- a/drivers/net/ep93xx.c
+++ b/drivers/net/ep93xx.c
@@ -599,14 +599,12 @@ static int ep93xx_phy_read(struct mii_bus *bus, int phy_addr, int phy_reg)
 	pr_debug("+ep93xx_phy_read\n");
 
 	/*
-	 * Save the current SelfCTL register value.  Set MAC to suppress
+	 * Save the current SelfCTL register value.  Set MAC to send
 	 * preamble bits.  Wait for any previous MII command to complete
 	 * before issuing the new command.
 	 */
 	self_ctl = readl(&regs->selfctl);
-#if defined(CONFIG_MII_SUPPRESS_PREAMBLE) /* TODO */
 	writel(self_ctl & ~(1 << 8), &regs->selfctl);
-#endif	/* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */
 
 	while (readl(&regs->miists) & MIISTS_BUSY)
 		; /* noop */
@@ -642,14 +640,12 @@ static int ep93xx_phy_write(struct mii_bus *bus, int phy_addr,
 	pr_debug("+ep93xx_phy_write\n");
 
 	/*
-	 * Save the current SelfCTL register value.  Set MAC to suppress
+	 * Save the current SelfCTL register value.  Set MAC to send
 	 * preamble bits.  Wait for any previous MII command to complete
 	 * before issuing the new command.
 	 */
 	self_ctl = readl(&regs->selfctl);
-#if defined(CONFIG_MII_SUPPRESS_PREAMBLE) /* TODO */
 	writel(self_ctl & ~(1 << 8), &regs->selfctl);
-#endif	/* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */
 
 	while (readl(&regs->miists) & MIISTS_BUSY)
 		; /* noop */
-- 
2.1.4




More information about the barebox mailing list