All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Sricharan R <r.sricharan@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	rnayak@ti.com, nm@ti.com, marc.zyngier@arm.com,
	mark.rutland@arm.com
Subject: Re: [PATCH V4] ARM: OMAP5/DRA7: realtime_counter: Configure CNTFRQ register
Date: Wed, 9 Oct 2013 09:18:09 -0400	[thread overview]
Message-ID: <52555791.10906@ti.com> (raw)
In-Reply-To: <5255573A.8050805@ti.com>

On Wednesday 09 October 2013 09:16 AM, Sricharan R wrote:
> On Wednesday 09 October 2013 06:45 PM, Sricharan R wrote:
>> Santosh,
>>
>> On Wednesday 09 October 2013 03:35 AM, Santosh Shilimkar wrote:
>>> On Tuesday 08 October 2013 05:45 PM, Tony Lindgren wrote:
>>>> * Sricharan R <r.sricharan@ti.com> [131003 03:27]:
>>>>> On Wednesday 18 September 2013 09:32 PM, Sricharan R wrote:
>>>>>> --- a/arch/arm/boot/dts/omap5.dtsi
>>>>>> +++ b/arch/arm/boot/dts/omap5.dtsi
>>>>>> @@ -52,7 +52,6 @@
>>>>>>  			     <GIC_PPI 14 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
>>>>>>  			     <GIC_PPI 11 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
>>>>>>  			     <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>;
>>>>>> -		clock-frequency = <6144000>;
>>>>>>  	};
>>>>>>  
>>>>>>  	gic: interrupt-controller@48211000 {
>>>> Can the above be done later on in a separate clean-up patch?
>>>> If so I can drop that part as that removes a dependency to the
>>>> .dts patches queued by Benoit.
>>>>
>>> This can be applied separately. 
>>>
>>>  
>>>>>> --- a/arch/arm/mach-omap2/omap-smp.c
>>>>>> +++ b/arch/arm/mach-omap2/omap-smp.c
>>>>>> @@ -41,6 +41,8 @@
>>>>>>  
>>>>>>  u16 pm44xx_errata;
>>>>>>  
>>>>>> +extern unsigned long arch_timer_freq;
>>>>>> +
>>>>>>  /* SCU base address */
>>>>>>  static void __iomem *scu_base;
>>>>>>  
>>>> No externs in *.c files please, checkpatch.pl and sparse should warn
>>>> about this.
>>>>
>>>>>  Are you planning to pull this patch and the below $subject patch as well? They are
>>>>>  acked and tested.
>>>>>
>>>>>  ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency
>>>>>
>>>>>   http://www.spinics.net/lists/linux-omap/msg97281.html
>>>> The 20MHz patch I've applied, just noticed the above things
>>>> when was about to apply this.
>>>>
>>> Now re-looking at the patch, I think this extern stuff can be and
>>> should be avoided. It needs order change though like below. Not
>>> tested but should work.
>>>
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index fa74a06..c8d8308 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -631,10 +631,9 @@ void __init omap4_local_timer_init(void)
>>>  #ifdef CONFIG_SOC_OMAP5
>>>  void __init omap5_realtime_timer_init(void)
>>>  {
>>> -	omap4_sync32k_timer_init();
>>>  	realtime_counter_init();
>>> -
>>>  	clocksource_of_init();
>>> +	omap4_sync32k_timer_init();
>>>  }
>>>  #endif /* CONFIG_SOC_OMAP5 */
>>>  
>>> Then, the CNTFREQ programming needs to be moved to
>>> realtime_counter_init(). It should be actually part of that
>>> first place instead of timer_init().
>>>
>>> On secondary CPU then a simple asm accessor can
>>> read the CNTFREQ and pass that to SMC.
>> Sorry,  I did not quite get you here. You mean an asm accessor to
>>  the read the variable that is set in timer.c ?
>  Also, is it not ok to move the extern to a .h file instead ?
> 
I think you can avoid that variable export with above suggestion


WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4] ARM: OMAP5/DRA7: realtime_counter: Configure CNTFRQ register
Date: Wed, 9 Oct 2013 09:18:09 -0400	[thread overview]
Message-ID: <52555791.10906@ti.com> (raw)
In-Reply-To: <5255573A.8050805@ti.com>

On Wednesday 09 October 2013 09:16 AM, Sricharan R wrote:
> On Wednesday 09 October 2013 06:45 PM, Sricharan R wrote:
>> Santosh,
>>
>> On Wednesday 09 October 2013 03:35 AM, Santosh Shilimkar wrote:
>>> On Tuesday 08 October 2013 05:45 PM, Tony Lindgren wrote:
>>>> * Sricharan R <r.sricharan@ti.com> [131003 03:27]:
>>>>> On Wednesday 18 September 2013 09:32 PM, Sricharan R wrote:
>>>>>> --- a/arch/arm/boot/dts/omap5.dtsi
>>>>>> +++ b/arch/arm/boot/dts/omap5.dtsi
>>>>>> @@ -52,7 +52,6 @@
>>>>>>  			     <GIC_PPI 14 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
>>>>>>  			     <GIC_PPI 11 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>,
>>>>>>  			     <GIC_PPI 10 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_LOW)>;
>>>>>> -		clock-frequency = <6144000>;
>>>>>>  	};
>>>>>>  
>>>>>>  	gic: interrupt-controller at 48211000 {
>>>> Can the above be done later on in a separate clean-up patch?
>>>> If so I can drop that part as that removes a dependency to the
>>>> .dts patches queued by Benoit.
>>>>
>>> This can be applied separately. 
>>>
>>>  
>>>>>> --- a/arch/arm/mach-omap2/omap-smp.c
>>>>>> +++ b/arch/arm/mach-omap2/omap-smp.c
>>>>>> @@ -41,6 +41,8 @@
>>>>>>  
>>>>>>  u16 pm44xx_errata;
>>>>>>  
>>>>>> +extern unsigned long arch_timer_freq;
>>>>>> +
>>>>>>  /* SCU base address */
>>>>>>  static void __iomem *scu_base;
>>>>>>  
>>>> No externs in *.c files please, checkpatch.pl and sparse should warn
>>>> about this.
>>>>
>>>>>  Are you planning to pull this patch and the below $subject patch as well? They are
>>>>>  acked and tested.
>>>>>
>>>>>  ARM: DRA7: realtime_counter: Add ratio registers for 20MHZ sys-clk frequency
>>>>>
>>>>>   http://www.spinics.net/lists/linux-omap/msg97281.html
>>>> The 20MHz patch I've applied, just noticed the above things
>>>> when was about to apply this.
>>>>
>>> Now re-looking at the patch, I think this extern stuff can be and
>>> should be avoided. It needs order change though like below. Not
>>> tested but should work.
>>>
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index fa74a06..c8d8308 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -631,10 +631,9 @@ void __init omap4_local_timer_init(void)
>>>  #ifdef CONFIG_SOC_OMAP5
>>>  void __init omap5_realtime_timer_init(void)
>>>  {
>>> -	omap4_sync32k_timer_init();
>>>  	realtime_counter_init();
>>> -
>>>  	clocksource_of_init();
>>> +	omap4_sync32k_timer_init();
>>>  }
>>>  #endif /* CONFIG_SOC_OMAP5 */
>>>  
>>> Then, the CNTFREQ programming needs to be moved to
>>> realtime_counter_init(). It should be actually part of that
>>> first place instead of timer_init().
>>>
>>> On secondary CPU then a simple asm accessor can
>>> read the CNTFREQ and pass that to SMC.
>> Sorry,  I did not quite get you here. You mean an asm accessor to
>>  the read the variable that is set in timer.c ?
>  Also, is it not ok to move the extern to a .h file instead ?
> 
I think you can avoid that variable export with above suggestion

  reply	other threads:[~2013-10-09 13:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 16:02 [PATCH V4] ARM: OMAP5/DRA7: realtime_counter: Configure CNTFRQ register Sricharan R
2013-09-18 16:02 ` Sricharan R
2013-10-03 10:19 ` Sricharan R
2013-10-03 10:19   ` Sricharan R
2013-10-08 21:45   ` Tony Lindgren
2013-10-08 21:45     ` Tony Lindgren
2013-10-08 22:05     ` Santosh Shilimkar
2013-10-08 22:05       ` Santosh Shilimkar
2013-10-09 13:15       ` Sricharan R
2013-10-09 13:15         ` Sricharan R
2013-10-09 13:16         ` Sricharan R
2013-10-09 13:16           ` Sricharan R
2013-10-09 13:18           ` Santosh Shilimkar [this message]
2013-10-09 13:18             ` Santosh Shilimkar
2013-10-09 13:17         ` Santosh Shilimkar
2013-10-09 13:17           ` Santosh Shilimkar
2013-10-09 13:20           ` Sricharan R
2013-10-09 13:20             ` Sricharan R
2013-10-09 13:23             ` Santosh Shilimkar
2013-10-09 13:23               ` Santosh Shilimkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52555791.10906@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=nm@ti.com \
    --cc=r.sricharan@ti.com \
    --cc=rnayak@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.