[OpenWrt-Devel] lantiq: correct value for fpi clock on ar9
diff mbox

Message ID 1421832908.6920.7.camel@merveille.lan
State Rejected
Headers show

Commit Message

Ben Mulvihill Jan. 21, 2015, 9:35 a.m. UTC
Hello,

This is a patch to go in target/linux/lantiq/patches-3.14/

It corrects the fpi clock value on lantiq ar9. See this discussion
for further details:

https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html

Comments

John Crispin Jan. 22, 2015, 7:34 a.m. UTC | #1
On 21/01/2015 10:35, Ben Mulvihill wrote:
> Hello,
> 
> This is a patch to go in target/linux/lantiq/patches-3.14/

please send a patch that adds the file instead of just sending the file


> 
> It corrects the fpi clock value on lantiq ar9. See this discussion
> for further details:
> 
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html
> 
> 
> --- a/arch/mips/lantiq/xway/clk.c	2015-01-21 10:15:44.000000000 +0100
> +++ b/arch/mips/lantiq/xway/clk.c	2015-01-21 10:17:29.000000000 +0100
> @@ -104,8 +104,9 @@ unsigned long ltq_ar9_fpi_hz(void)
>  	unsigned long sys = ltq_ar9_sys_hz();
>  
>  	if (ltq_cgu_r32(CGU_SYS) & BIT(0))
> -		return sys;
> -	return sys >> 1;
> +		return sys / 3;
> +	else
> +		return sys / 2;
>  }
>  
>  unsigned long ltq_ar9_cpu_hz(void)
>
Ben Mulvihill Jan. 22, 2015, 9:11 a.m. UTC | #2
On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote:
> 
> On 21/01/2015 10:35, Ben Mulvihill wrote:
> > Hello,
> > 
> > This is a patch to go in target/linux/lantiq/patches-3.14/
> 
> please send a patch that adds the file instead of just sending the file
> 
> 
Sure, will do. I would have done, but I remembered you replying to 
someone else a little while ago that you preferred to "roll your own".

Ben
John Crispin Jan. 22, 2015, 9:36 a.m. UTC | #3
On 22/01/2015 10:11, Ben Mulvihill wrote:
> On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote:
>>
>> On 21/01/2015 10:35, Ben Mulvihill wrote:
>>> Hello,
>>>
>>> This is a patch to go in target/linux/lantiq/patches-3.14/
>>
>> please send a patch that adds the file instead of just sending the file
>>
>>
> Sure, will do. I would have done, but I remembered you replying to 
> someone else a little while ago that you preferred to "roll your own".
> 
> Ben
> 


not sure which mail you mean but i guess it was related to the time when
we moved some of the code from patches/ to files/

Patch
diff mbox

--- a/arch/mips/lantiq/xway/clk.c	2015-01-21 10:15:44.000000000 +0100
+++ b/arch/mips/lantiq/xway/clk.c	2015-01-21 10:17:29.000000000 +0100
@@ -104,8 +104,9 @@  unsigned long ltq_ar9_fpi_hz(void)
 	unsigned long sys = ltq_ar9_sys_hz();
 
 	if (ltq_cgu_r32(CGU_SYS) & BIT(0))
-		return sys;
-	return sys >> 1;
+		return sys / 3;
+	else
+		return sys / 2;
 }
 
 unsigned long ltq_ar9_cpu_hz(void)