Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1167178

[PATCH 2/4] net: stmmac: dwmac-rk: Fix clk rate when provided by soc

From Heiko Stuebner <heiko@sntech.de>
Newsgroups linux.kernel
Subject [PATCH 2/4] net: stmmac: dwmac-rk: Fix clk rate when provided by soc
Date 2015-06-18 00:00 +0200
Message-ID <pCtxg-5z3-13@gated-at.bofh.it> (permalink)
References <pCtxf-5z3-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The first iteration of the dwmac-rk support did access an intermediate
clock directly below the pll selector. This was removed in a subsequent
revision, but the clock and one invocation remained. This results in
the driver trying to set the rate of a non-existent clock when the soc
and not some external source provides the phy clock for RMII phys.

So set the rate of the correct clock and remove the remaining now
completely unused definition.

Fixes: 436f5ae08f9d ("GMAC: add driver for Rockchip RK3288 SoCs integrated GMAC")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 49c7715..4faa283 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -42,7 +42,6 @@ struct rk_priv_data {
 	bool clock_input;
 
 	struct clk *clk_mac;
-	struct clk *clk_mac_pll;
 	struct clk *gmac_clkin;
 	struct clk *mac_clk_rx;
 	struct clk *mac_clk_tx;
@@ -209,7 +208,7 @@ static int gmac_clk_init(struct rk_priv_data *bsp_priv)
 		dev_info(dev, "%s: clock input from PHY\n", __func__);
 	} else {
 		if (bsp_priv->phy_iface == PHY_INTERFACE_MODE_RMII)
-			clk_set_rate(bsp_priv->clk_mac_pll, 50000000);
+			clk_set_rate(bsp_priv->clk_mac, 50000000);
 	}
 
 	return 0;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] net: stmmac: dwmac-rk: add support for rk3368 Heiko Stuebner <heiko@sntech.de> - 2015-06-18 00:00 +0200
  [PATCH 2/4] net: stmmac: dwmac-rk: Fix clk rate when provided by soc Heiko Stuebner <heiko@sntech.de> - 2015-06-18 00:00 +0200
  [PATCH 4/4] net: stmmac: dwmac-rk: add rk3368-specific data Heiko Stuebner <heiko@sntech.de> - 2015-06-18 00:00 +0200
  Re: [PATCH 0/4] net: stmmac: dwmac-rk: add support for rk3368 David Miller <davem@davemloft.net> - 2015-06-21 19:30 +0200

csiph-web