[PATCH 2/2] i.MX35: remove get_3_3_div helper function

Sergei Shtylyov sshtylyov at mvista.com
Fri Apr 23 09:20:08 EDT 2010


Hello.

Sascha Hauer wrote:

>>>  static unsigned long get_rate_uart(struct clk *clk)
>>>  {
>>>  	unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3);
>>>  	unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4);
>>> -	unsigned long div = get_3_3_div(pdr4 >> 10);
>>> +	unsigned long div = ((pdr4 >> 10) & 0x3f) + 1;
>>>   	if (pdr3 & (1 << 14))
>>>  		return get_rate_arm() / div;
>>> @@ -218,7 +213,7 @@ static unsigned long get_rate_sdhc(struct clk *clk)
>>>  		break;
>>>  	}
>>>  -	return rate / get_3_3_div(div);
>>> +	return rate / (div + 1);
>>>   
>>>       
>>   You're adding 1 to divisor twice here...
>>     
>
> Look again, these hunks are in two different functions.
>   

   Indeed -- sorry.

> Sascha

WBR, Sergei




More information about the linux-arm-kernel mailing list