[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F55C4FE.7010607@st.com>
Date: Tue, 06 Mar 2012 09:04:14 +0100
From: Giuseppe CAVALLARO <peppe.cavallaro@...com>
To: Deepak Sikri <deepak.sikri@...com>
Cc: spear-devel@...t.st.com, netdev@...r.kernel.org
Subject: Re: [PATCH 3/6] stmmac: Add support for CPU freq notifiers.
On 3/5/2012 4:05 PM, Giuseppe CAVALLARO wrote:
[snip]
>> +#ifdef CONFIG_CPU_FREQ
>> +static inline void stmmac_clk_csr_set(struct stmmac_priv *priv, int clk_rate)
>> +{
>> +
>> + if ((clk_rate >= CSR_F_20M) && (clk_rate < CSR_F_35M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_20_35M;
>> + else if ((clk_rate >= CSR_F_35M) && (clk_rate < CSR_F_60M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_35_60M;
>> + else if ((clk_rate >= CSR_F_60M) && (clk_rate < CSR_F_100M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_60_100M;
>> + else if ((clk_rate >= CSR_F_100M) && (clk_rate < CSR_F_150M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_100_150M;
>> + else if ((clk_rate >= CSR_F_150M) && (clk_rate < CSR_F_250M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_150_250M;
>> + else if ((clk_rate >= CSR_F_250M) && (clk_rate < CSR_F_300M))
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_250_300M;
>> + else
>> + priv->plat->clk_csr = STMMAC_CLK_RANGE_150_250M;
Another note is that you are overriding the priv->plat->clk_csr that was
passed through the platform and used in some case on other architectures.
peppe
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists