diff options
author | Stefan Roese <sr@denx.de> | 2012-06-07 23:21:05 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-11 16:48:15 -0700 |
commit | 883ffd6e64114495f68652721065149a2bbd9de6 (patch) | |
tree | 85efc6c8d88d313f4d2a06afea427c9d3fe9e6e6 /drivers/net/ethernet | |
parent | 3f16da51b0e533871d22a29682f3c3969d4f7e22 (diff) | |
download | op-kernel-dev-883ffd6e64114495f68652721065149a2bbd9de6.zip op-kernel-dev-883ffd6e64114495f68652721065149a2bbd9de6.tar.gz |
net: stmmac: Fix clock en-/disable calls
clk_{un}prepare is mandatory for platforms using common clock framework.
Since these drivers are used by SPEAr platform, which supports common
clock framework, add clk_{un}prepare() support for them. Otherwise
the clocks are not correctly en-/disabled and ethernet support doesn't
work.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 94b21b4..dc20c56 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -109,7 +109,7 @@ struct stmmac_priv *stmmac_dvr_probe(struct device *device, static inline int stmmac_clk_enable(struct stmmac_priv *priv) { if (!IS_ERR(priv->stmmac_clk)) - return clk_enable(priv->stmmac_clk); + return clk_prepare_enable(priv->stmmac_clk); return 0; } @@ -119,7 +119,7 @@ static inline void stmmac_clk_disable(struct stmmac_priv *priv) if (IS_ERR(priv->stmmac_clk)) return; - clk_disable(priv->stmmac_clk); + clk_disable_unprepare(priv->stmmac_clk); } static inline int stmmac_clk_get(struct stmmac_priv *priv) { |