net: stmmac: Fix clock en-/disable calls
Subsystems (4)
PATCH v2 1/1 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.
---
v2:
- Patch description added. Sorry for missing this in the 1st patch revision.
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac.h +2 -2
@@ -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) {
Signature · 1 line
1.7.10.4
From: Stefan Roese <[email protected]>
Date: Fri, 8 Jun 2012 11:21:05 +0200
Quoted 7 lines
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 <[email protected]>
Applied, thanks.