[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/15] hw/timer/arm_timer: Extract arm_timer_reset()
From: |
Peter Maydell |
Subject: |
Re: [PATCH 07/15] hw/timer/arm_timer: Extract arm_timer_reset() |
Date: |
Thu, 8 Jun 2023 15:46:33 +0100 |
On Wed, 31 May 2023 at 21:36, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Extract arm_timer_reset() before converting this model to QOM/QDev
> in few commits. This will become our DeviceReset handler.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/timer/arm_timer.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
> index 2cd8c99b4e..54318d0a57 100644
> --- a/hw/timer/arm_timer.c
> +++ b/hw/timer/arm_timer.c
> @@ -172,13 +172,18 @@ static const VMStateDescription vmstate_arm_timer = {
> }
> };
>
> +static void arm_timer_reset(ArmTimerState *s)
> +{
> + s->control = TIMER_CTRL_IE;
> +}
Reset also should zero s->limit and s->int_level.
(in arm_timer_init() this was implicit in the g_new0()).)
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 07/15] hw/timer/arm_timer: Extract arm_timer_reset(),
Peter Maydell <=