[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>
- Re: [PATCH for-6.2 15/25] hw/arm/nrf51: Wire up sysclk, (continued)
- [PATCH for-6.2 20/25] hw/arm/msf2-soc: Wire up refclk, Peter Maydell, 2021/08/12
- [PATCH for-6.2 22/25] hw/arm/stellaris: Fix code style issues in GPTM code, Peter Maydell, 2021/08/12
- [PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale, Peter Maydell, 2021/08/12
- Re: [PATCH for-6.2 24/25] hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale,
Damien Hedde <=
- [PATCH for-6.2 18/25] hw/arm/msf2_soc: Don't allocate separate MemoryRegions, Peter Maydell, 2021/08/12
- [PATCH for-6.2 23/25] hw/arm/stellaris: Split stellaris-gptm into its own file, Peter Maydell, 2021/08/12
- [PATCH for-6.2 25/25] arm: Remove system_clock_scale global, Peter Maydell, 2021/08/12