[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/arm: Set up Versatile Express timer frequency to 24 Mhz

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.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.