* [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset
@ 2023-10-04 5:53 Tong Ho
2023-10-04 19:21 ` Francisco Iglesias
2023-10-16 16:31 ` Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Tong Ho @ 2023-10-04 5:53 UTC (permalink / raw)
To: qemu-arm; +Cc: qemu-devel, alistair, edgar.iglesias, peter.maydell, tong.ho
This change implements the ResettableClass interface for the device.
Signed-off-by: Tong Ho <tong.ho@amd.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset
2023-10-04 5:53 [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset Tong Ho
@ 2023-10-04 19:21 ` Francisco Iglesias
2023-10-16 16:31 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Francisco Iglesias @ 2023-10-04 19:21 UTC (permalink / raw)
To: Tong Ho; +Cc: qemu-arm, qemu-devel, alistair, edgar.iglesias, peter.maydell
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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset
2023-10-04 5:53 [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset Tong Ho
2023-10-04 19:21 ` Francisco Iglesias
@ 2023-10-16 16:31 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2023-10-16 16:31 UTC (permalink / raw)
To: Tong Ho; +Cc: qemu-arm, qemu-devel, alistair, edgar.iglesias
On Wed, 4 Oct 2023 at 06:53, Tong Ho <tong.ho@amd.com> wrote:
>
> This change implements the ResettableClass interface for the device.
>
> Signed-off-by: Tong Ho <tong.ho@amd.com>
> ---
> hw/nvram/xlnx-versal-efuse-ctrl.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-16 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 5:53 [PATCH] xlnx-versal-efuse: hw/nvram: Remove deprecated device reset Tong Ho
2023-10-04 19:21 ` Francisco Iglesias
2023-10-16 16:31 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.