Subject: Re: [PATCH 3/6] stmmac: Add support for CPU freq notifiers.

From: Giuseppe CAVALLARO <[email-masked]>
Date: Tue, 06 Mar 2012 09:04:14 +0100

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