qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Francisco Iglesias <frasse.iglesias@gmail.com>
To: Tong Ho <tong.ho@amd.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	alistair@alistair23.me, edgar.iglesias@gmail.com,
	peter.maydell@linaro.org
Subject: Re: [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset
Date: Wed, 4 Oct 2023 21:21:17 +0200	[thread overview]
Message-ID: <20231004192117.GE18959@fralle-msi> (raw)
In-Reply-To: <20231004055339.323833-1-tong.ho@amd.com>

On [2023 Oct 03] Tue 22:53:39, Tong Ho wrote:
> This change implements the ResettableClass interface for the device.
> 
> Signed-off-by: Tong Ho <tong.ho@amd.com>

Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>

> ---
>  hw/nvram/xlnx-versal-efuse-ctrl.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse-ctrl.c
> index b35ba65ab5..beb5661c35 100644
> --- a/hw/nvram/xlnx-versal-efuse-ctrl.c
> +++ b/hw/nvram/xlnx-versal-efuse-ctrl.c
> @@ -2,6 +2,7 @@
>   * QEMU model of the Versal eFuse controller
>   *
>   * Copyright (c) 2020 Xilinx Inc.
> + * Copyright (c) 2023 Advanced Micro Devices, Inc.
>   *
>   * Permission is hereby granted, free of charge, to any person obtaining a copy
>   * of this software and associated documentation files (the "Software"), to deal
> @@ -657,9 +658,9 @@ static void efuse_ctrl_register_reset(RegisterInfo *reg)
>      register_reset(reg);
>  }
>  
> -static void efuse_ctrl_reset(DeviceState *dev)
> +static void efuse_ctrl_reset_hold(Object *obj)
>  {
> -    XlnxVersalEFuseCtrl *s = XLNX_VERSAL_EFUSE_CTRL(dev);
> +    XlnxVersalEFuseCtrl *s = XLNX_VERSAL_EFUSE_CTRL(obj);
>      unsigned int i;
>  
>      for (i = 0; i < ARRAY_SIZE(s->regs_info); ++i) {
> @@ -749,8 +750,9 @@ static Property efuse_ctrl_props[] = {
>  static void efuse_ctrl_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> +    ResettableClass *rc = RESETTABLE_CLASS(klass);
>  
> -    dc->reset = efuse_ctrl_reset;
> +    rc->phases.hold = efuse_ctrl_reset_hold;
>      dc->realize = efuse_ctrl_realize;
>      dc->vmsd = &vmstate_efuse_ctrl;
>      device_class_set_props(dc, efuse_ctrl_props);
> -- 
> 2.25.1
> 
> 


  reply	other threads:[~2023-10-04 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04  5:53 [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset Tong Ho
2023-10-04 19:21 ` Francisco Iglesias [this message]
2023-10-16 16:31 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231004192117.GE18959@fralle-msi \
    --to=frasse.iglesias@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tong.ho@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).