[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 13/17] hw/misc: Add nr_regs and cold_reset_values to NPCM
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 13/17] hw/misc: Add nr_regs and cold_reset_values to NPCM CLK |
Date: |
Tue, 4 Feb 2025 16:04:36 +0000 |
On Thu, 26 Dec 2024 at 08:28, Hao Wu <wuhaotsh@google.com> wrote:
>
> These 2 values are different between NPCM7XX and NPCM8XX
> CLKs. So we add them to the class and assign different values
> to them.
>
> Signed-off-by: Hao Wu <wuhaotsh@google.com>
> ---
> hw/misc/npcm_clk.c | 17 +++++++++++------
> include/hw/misc/npcm_clk.h | 9 ++++++++-
> 2 files changed, 19 insertions(+), 7 deletions(-)
>
> @@ -870,10 +872,9 @@ static const struct MemoryRegionOps npcm_clk_ops = {
> static void npcm_clk_enter_reset(Object *obj, ResetType type)
> {
> NPCMCLKState *s = NPCM_CLK(obj);
> + NPCMCLKClass *c = NPCM_CLK_GET_CLASS(s);
>
> - QEMU_BUILD_BUG_ON(sizeof(s->regs) != sizeof(cold_reset_values));
> -
> - memcpy(s->regs, cold_reset_values, sizeof(cold_reset_values));
> + memcpy(s->regs, c->cold_reset_values, sizeof(s->regs));
Same remark about an assert as in the other patch.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 13/17] hw/misc: Add nr_regs and cold_reset_values to NPCM CLK,
Peter Maydell <=