qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] Adding sp804 timer to the virtboard


From: Peter Maydell
Subject: Re: [Qemu-arm] Adding sp804 timer to the virtboard
Date: Fri, 5 Feb 2016 10:52:56 +0000

On 3 February 2016 at 20:57, Jintack Lim <address@hidden> wrote:
> I'd like to replace an arm arch timer with sp804 timer in the virtboard.
> What would be the easiest way to do that?

(I'm assuming this is all just for local testing purposes, rather than
with any intention of upstreaming a patch to add an sp804.)

Do you need to actually remove the arch timers, or just provide
the sp804 as well?

(You can't remove the architected timers easily from emulated,
or at all if you're using KVM, but you can straightforwardly
comment out the bits of code in virt.c that advertise them in the dtb.)

> I'm thinking to add sp804 node to DT as follows which is from
> arch/arm/boot/dts/vexpress-v2m.dtsi.
> v2m_timer01: address@hidden {
>         compatible = "arm,sp804", "arm,primecell";
>         reg = <0x11000 0x1000>;
>         interrupts = <2>;
>         clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&smbclk>;
>         clock-names = "timclken1", "timclken2", "apb_pclk";
> };
>
> The values of reg and interrupts will be replaced properly.
> About the clock property, should I also add the original clock providers
> such as sp810 and in turn 32k, 1M and smb clocks?
> Or canI just use apb-pclk, which is an existing clock provider in the
> virtboard, for all three clocks?

For a virtual machine the clocks are all irrelevant anyway, I think
(we don't actually have any kind of 24MHz clock) -- we just provide
them because the kernel insists that the dtb says something about
clocks. So I would start by just borrowing the apb-pclk and seeing
if that works.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]