mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: barebox@lists.infradead.org
Cc: m.tretter@pengutronix.de
Subject: [PATCH] net: macb: add tx clock rate for 10 MBit link
Date: Fri, 19 Mar 2021 17:26:05 +0100	[thread overview]
Message-ID: <20210319162605.2898826-1-m.tretter@pengutronix.de> (raw)

If the phy reports a 10 MBit link, which can happen during link
negotiation, the macb prints a warning, because it does not know the
clock rate for the TX clock.

Implement setting the TX clock rate for 10 MBit to avoid the warnings.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/net/macb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 188dbf2d8c15..14a0b45322bf 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -269,6 +269,9 @@ static int macb_set_tx_clk(struct macb_device *macb, int speed)
 	}
 
 	switch (speed) {
+	case SPEED_10:
+		rate = 2500000;
+		break;
 	case SPEED_100:
 		rate = 25000000;
 		break;
-- 
2.29.2


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


             reply	other threads:[~2021-03-19 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 16:26 Michael Tretter [this message]
2021-03-22  5:03 ` 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=20210319162605.2898826-1-m.tretter@pengutronix.de \
    --to=m.tretter@pengutronix.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