All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: macb: ignore tx_clk if MII is used
@ 2021-01-20 19:43 Michael Walle
  2021-01-20 20:29 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michael Walle @ 2021-01-20 19:43 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: Nicolas Ferre, Claudiu Beznea, David S . Miller, Michael Walle

If the MII interface is used, the PHY is the clock master, thus don't
set the clock rate. On Zynq-7000, this will prevent the following
warning:
  macb e000b000.ethernet eth0: unable to generate target frequency: 25000000 Hz

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/net/ethernet/cadence/macb_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 814a5b10141d..472bf8f220bc 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -470,6 +470,10 @@ static void macb_set_tx_clk(struct macb *bp, int speed)
 	if (!bp->tx_clk || (bp->caps & MACB_CAPS_CLK_HW_CHG))
 		return;
 
+	/* In case of MII the PHY is the clock master */
+	if (bp->phy_interface == PHY_INTERFACE_MODE_MII)
+		return;
+
 	switch (speed) {
 	case SPEED_10:
 		rate = 2500000;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-22 12:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 19:43 [PATCH] net: macb: ignore tx_clk if MII is used Michael Walle
2021-01-20 20:29 ` Andrew Lunn
2021-01-21  9:19 ` Claudiu.Beznea
2021-01-21  9:41   ` Michael Walle
2021-01-22  9:10     ` Claudiu.Beznea
2021-01-22 11:20       ` Michael Walle
2021-01-22 11:38         ` Claudiu.Beznea
2021-01-22 12:32           ` Michael Walle
2021-01-22  4:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.