mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Kurz <akurz@blala.de>
To: barebox@lists.infradead.org
Cc: Alexander Kurz <akurz@blala.de>
Subject: [PATCH 3/3] net ep93xx mii: do not supress MII preamble transmission
Date: Sun, 21 Feb 2016 19:06:30 +0100	[thread overview]
Message-ID: <1456077990-15003-3-git-send-email-akurz@blala.de> (raw)
In-Reply-To: <1456077990-15003-1-git-send-email-akurz@blala.de>

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-02-21 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-21 18:06 [PATCH 1/3] EP93xx eth: allow passing of phy config via platform data Alexander Kurz
2016-02-21 18:06 ` [PATCH 2/3] edb9302 eth: privide proper phy config Alexander Kurz
2016-02-21 18:06 ` Alexander Kurz [this message]
2016-02-23  8:03 ` [PATCH 1/3] EP93xx eth: allow passing of phy config via platform data Sascha Hauer
2016-02-24  8:04 ` Sascha Hauer
2016-02-24 20:07   ` Alexander Kurz
2016-02-25  8:43     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456077990-15003-3-git-send-email-akurz@blala.de \
    --to=akurz@blala.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox