Commit 43e57631 authored by Michael Walle's avatar Michael Walle Committed by Jakub Kicinski

net: macb: ignore tx_clk if MII is used

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: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210120194303.28268-1-michael@walle.ccSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 19038523
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment