* [PATCH v2] net: stmmac: Fix clock en-/disable calls
@ 2012-06-08 9:21 Stefan Roese
2012-06-11 23:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2012-06-08 9:21 UTC (permalink / raw)
To: netdev; +Cc: Viresh Kumar, Giuseppe Cavallaro
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>
---
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(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 6b5d060..f46d8d0 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)
{
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] net: stmmac: Fix clock en-/disable calls
2012-06-08 9:21 [PATCH v2] net: stmmac: Fix clock en-/disable calls Stefan Roese
@ 2012-06-11 23:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-06-11 23:50 UTC (permalink / raw)
To: sr; +Cc: netdev, viresh.linux, peppe.cavallaro
From: Stefan Roese <sr@denx.de>
Date: Fri, 8 Jun 2012 11:21:05 +0200
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-11 23:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08 9:21 [PATCH v2] net: stmmac: Fix clock en-/disable calls Stefan Roese
2012-06-11 23:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).