From: Julien Grall <julien.grall@linaro.org>
To: Tim Deegan <tim@xen.org>
Cc: Xen Devel <xen-devel@lists.xen.org>,
Sengul Thomas <thomas.sengul@gmail.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
patches@linaro.org,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] xen/arm: Set up Versatile Express timer frequency to 24 Mhz
Date: Wed, 26 Jun 2013 12:10:59 +0100 [thread overview]
Message-ID: <51CACC43.6020708@linaro.org> (raw)
In-Reply-To: <20130626105233.GB18887@ocelot.phlegethon.org>
On 06/26/2013 11:52 AM, Tim Deegan wrote:
> At 11:24 +0100 on 26 Jun (1372245863), Stefano Stabellini wrote:
>> On Wed, 26 Jun 2013, Tim Deegan wrote:
>>> At 09:05 +0900 on 26 Jun (1372237555), Sengul Thomas wrote:
>>>>>
>>>>> Timers on ARM seems a bit complex. The current issue is with arch timer
>>>>> (which is also used by dom0).
>>>>
>>>> Just out of curiosity, what is the difference between arch timer and
>>>> platform timer?
>>>
>>> The arch timer has its interface specified in the CPU manual and
>>> required (IIRC) for any processor that supports the virt extensions.
>>> The platform timers are whatever other time sources come on the SoC
>>> you're running on.
>>>
>>> Having thought about this a bit, ISTR that the register in Julien's
>>> patch doesn't control anything -- it's there to tell the arch timer's
>>> users how fast that timer is going, so it ought to be set up by whatever
>>> sets up the timer itself (turning on oscillators &c).
>>>
>>> So the right thing to do is to move that write into more board-specific
>>> start-of-day code (and eventually into the boot-wrapper), and rely on
>>> the bootloader/firmware to have done it in the general case.
>>
>> I think that you are right
>>
>>
>>> On a real
>>> TC2 is that register already correct at (xen's) boot time?
>>>
>>> But presumably just changing it from 100KHz to 24KHz for all vexpresses
>>> is wrong because that will break things on the software models in the
>>> opposite way.
>>
>> I think we should read CNTFRQ at boot time rather than trying to write
>> it. We should be able to cope with whatever frequency has been setup by
>> the firmware, right?
>
> Yes -- in the case where the firmware has done it, we should be reading
> this register rather than writing it.
Xen already reads the timer frequency in arm/time.c.
> On the software VE model the code was developed on, there is no firmware
> and so Xen has to set this up along with the other things that we'd
> expect firmware to do. So we can move that write to the start-fo-day
> board-specific asm hacks, and the actual driver code can just read it.
Is it possible to start to use u-boot on the VE model? So we can remove
the code which set up the timer freqency.
--
Julien
next prev parent reply other threads:[~2013-06-26 11:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 13:10 [PATCH] xen/arm: Set up Versatile Express timer frequency to 24 Mhz Julien Grall
2013-06-24 13:51 ` Tim Deegan
2013-06-24 14:52 ` Stefano Stabellini
2013-06-24 15:58 ` Julien Grall
2013-06-24 16:26 ` Stefano Stabellini
2013-06-25 15:31 ` Ian Campbell
2013-06-25 15:46 ` Julien Grall
2013-06-25 16:30 ` Ian Campbell
2013-06-26 0:05 ` Sengul Thomas
2013-06-26 8:31 ` Tim Deegan
2013-06-26 10:24 ` Stefano Stabellini
2013-06-26 10:52 ` Tim Deegan
2013-06-26 11:10 ` Julien Grall [this message]
2013-06-26 11:39 ` Ian Campbell
2013-06-26 12:38 ` Julien Grall
2013-06-26 12:41 ` Tim Deegan
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=51CACC43.6020708@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=patches@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=thomas.sengul@gmail.com \
--cc=tim@xen.org \
--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 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.