qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input inste


From: Damien Hedde
Subject: Re: [PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale
Date: Wed, 18 Aug 2021 14:03:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0


On 8/12/21 11:33 AM, Peter Maydell wrote:
> The stellaris-gptm timer currently uses system_clock_scale for one of
> its timer modes where the timer runs at the CPU clock rate.  Make it
> use a Clock input instead.
> 
> We don't try to make the timer handle changes in the clock frequency
> while the downcounter is running.  This is not a change in behaviour
> from the previous system_clock_scale implementation -- we will pick
> up the new frequency only when the downcounter hits zero.  Handling
> dynamic clock changes when the counter is running would require state
> that the current gptm implementation doesn't have.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> As noted in the comment, ideally we would convert the device to use
> ptimer for its downcounter, which supports frequency changes while
> the counter is running and would also allow reading the timer value.
> But I don't want to make and test that change to a minor timer device
> in a board model I wouldn't recommend anybody actually use; this
> series is long enough as it is...
> ---
>  include/hw/timer/stellaris-gptm.h |  3 +++
>  hw/arm/stellaris.c                | 12 +++++++++---
>  hw/timer/stellaris-gptm.c         | 26 ++++++++++++++++++++++----
>  3 files changed, 34 insertions(+), 7 deletions(-)
> 

Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>



reply via email to

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