xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Chen Baozi <baozich@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Andrii Anisov <andrii.anisov@globallogic.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3 5/5] xen/arm: Add OMAP5 architected timer initialization codes.
Date: Thu, 08 Aug 2013 11:12:39 +0100	[thread overview]
Message-ID: <52036F17.5070006@linaro.org> (raw)
In-Reply-To: <D580E02D-1AB5-4D34-81AE-4F56C7E1DA2B@gmail.com>

On 08/08/2013 09:58 AM, Chen Baozi wrote:
> 
> On Aug 8, 2013, at 4:31 PM, Andrii Anisov <andrii.anisov@globallogic.com> wrote:
> 
>> diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
>> index 4ed7882..104aefc 100644
>> --- a/xen/arch/arm/time.c
>> +++ b/xen/arch/arm/time.c
>> @@ -104,6 +104,7 @@ int __init init_xen_time(void)
>>      struct dt_device_node *dev;
>>      int res;
>>      unsigned int i;
>> +    u32 rate;
>>
>>      dev = dt_find_compatible_node(NULL, NULL, "arm,armv7-timer");
>>      if ( !dev )
>> @@ -134,7 +135,11 @@ int __init init_xen_time(void)
>>      if ( !cpu_has_gentimer )
>>          panic("CPU does not support the Generic Timer v1 interface.\n");
>>
>> -    cpu_khz = READ_SYSREG32(CNTFRQ_EL0) / 1000;
>> +    res = dt_property_read_u32(dev, "clock-frequency", &rate);
>> +    if ( res )
>> +       cpu_khz = rate / 1000;
>> +    else
>> +        cpu_khz = READ_SYSREG32(CNTFRQ_EL0) / 1000;
>>
>>      boot_count = READ_SYSREG64(CNTPCT_EL0);
>>      printk("Using generic timer at %lu KHz\n", cpu_khz);
>>
>> I would suggest to extract this into a separate patch. This chunk is a generic improvement to add support of dt specified clock freq, while all the rest is a platform specific.
> 
> I'm OK with it. What's your opinion, Julien?

I'm OK with Andrii. It's better to have only one functionality per patch.

Cheers,

-- 
Julien Grall

      reply	other threads:[~2013-08-08 10:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 14:18 [PATCH v3 0/5] Add UART support and arch timer initialization for OMAP5 Chen Baozi
2013-08-07 14:18 ` [PATCH v3 1/5] xen: rename ns16550-uart.h to 8250-uart.h and fix some typos Chen Baozi
2013-08-07 16:53   ` Keir Fraser
2013-08-07 14:18 ` [PATCH v3 2/5] xen/arm: add 8250 compatible UART support for early_printk Chen Baozi
2013-08-07 14:18 ` [PATCH v3 3/5] xen/arm: Add the new OMAP UART driver Chen Baozi
2013-08-07 17:12   ` Julien Grall
2013-08-07 14:18 ` [PATCH v3 4/5] xen/arm: Introduce platform recognition codes for the OMAP5 Chen Baozi
2013-08-07 16:59   ` Julien Grall
2013-08-07 14:18 ` [PATCH v3 5/5] xen/arm: Add OMAP5 architected timer initialization codes Chen Baozi
2013-08-07 17:05   ` Julien Grall
2013-08-08  8:31   ` Andrii Anisov
2013-08-08  8:58     ` Chen Baozi
2013-08-08 10:12       ` Julien Grall [this message]

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=52036F17.5070006@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrii.anisov@globallogic.com \
    --cc=baozich@gmail.com \
    --cc=xen-devel@lists.xen.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).