linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/4] ARM: dt: register local timers as early platform devices
Date: Sat, 25 Jun 2011 16:20:59 -0500	[thread overview]
Message-ID: <4E06513B.4030706@gmail.com> (raw)
In-Reply-To: <20110625204742.GB15026@ponder.secretlab.ca>

Grant,

On 06/25/2011 03:47 PM, Grant Likely wrote:
> On Fri, Jun 24, 2011 at 03:10:57PM +0100, Marc Zyngier wrote:
>> Use of_early_platform_populate() to collect nodes with the
>> "localtimer" compatible property and register them with
>> the early platform "bus".
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>>  arch/arm/kernel/time.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
>> index 32d0df8..08a28ef 100644
>> --- a/arch/arm/kernel/time.c
>> +++ b/arch/arm/kernel/time.c
>> @@ -25,6 +25,7 @@
>>  #include <linux/timer.h>
>>  #include <linux/irq.h>
>>  #include <linux/platform_device.h>
>> +#include <linux/of_platform.h>
>>  
>>  #include <linux/mc146818rtc.h>
>>  
>> @@ -156,6 +157,9 @@ static void __init __arm_late_time_init(void)
>>  		arm_late_time_init();
>>  
>>  #ifdef CONFIG_LOCAL_TIMER_DEVICES
>> +#ifdef CONFIG_OF_FLATTREE
>> +	of_early_platform_populate("localtimer");
>> +#endif
> 
> Rather than #ifdeffing around the function call, it is often cleaner
> to have an #else in the header file that defines an empty static
> inline.
> 
>>  	early_platform_driver_register_all("localtimer");
>>  	early_platform_driver_probe("localtimer", 1, 0);
> 
> I suggested in my other reply that early_platform_driver should not be
> used.  It looks like it is already being used, so I'll back off a bit
> from that position.  However, the structure of the code really
> shouldn't be any different between clock devices being statically
> declared vs. clock data being obtained from the DT.
> 

It's not really already being used. It is added in Marc's previous patch
series to move timers to drivers/clocksource.

Deferring driver probe doesn't really help for timers as they have to be
up early. If early platform drivers shouldn't be used, then why was it
accepted into the kernel in the first place? It doesn't make sense that
it is okay for one arch (sh), but not another (arm), or that it is okay
for non-DT, but not for DT.

Rob

  reply	other threads:[~2011-06-25 21:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 14:10 [RFC PATCH 0/4] DT support for ARM GIC and TWD Marc Zyngier
2011-06-24 14:10 ` [RFC PATCH 1/4] dt: early platform devices support Marc Zyngier
2011-06-25  4:49   ` Grant Likely
2011-06-25 11:11     ` Marc Zyngier
2011-06-25 20:44       ` Grant Likely
2011-06-27  9:54         ` Marc Zyngier
2011-06-24 14:10 ` [RFC PATCH 2/4] ARM: dt: register local timers as early platform devices Marc Zyngier
2011-06-25 20:47   ` Grant Likely
2011-06-25 21:20     ` Rob Herring [this message]
2011-06-26  7:00       ` Grant Likely
     [not found]         ` <4E0786FF.9010002@firmworks.com>
2011-06-26 21:24           ` "Early" devices and the DT glikely@secretlab.ca
2011-06-24 14:10 ` [RFC PATCH 3/4] ARM: dt: add GIC bindings and driver support Marc Zyngier
2011-06-26  8:01   ` Grant Likely
2011-06-27 10:27     ` Marc Zyngier
2011-06-27 15:02       ` Grant Likely
2011-06-24 14:10 ` [RFC PATCH 4/4] ARM: dt: Add TWD " Marc Zyngier
2011-06-26  8:09   ` Grant Likely
2011-06-27 10:39     ` Marc Zyngier

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=4E06513B.4030706@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).