mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
hw/fsi/aspeed_apb2opb: convert to use Resettable interface
Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen <kane_chen@aspeedtech.com> Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com> Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-21-kane_chen@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
3e39f23a6d
commit
841be4c36e
@@ -302,9 +302,9 @@ static void fsi_aspeed_apb2opb_realize(DeviceState *dev, Error **errp)
|
||||
}
|
||||
}
|
||||
|
||||
static void fsi_aspeed_apb2opb_reset(DeviceState *dev)
|
||||
static void fsi_aspeed_apb2opb_reset_hold(Object *obj, ResetType type)
|
||||
{
|
||||
AspeedAPB2OPBState *s = ASPEED_APB2OPB(dev);
|
||||
AspeedAPB2OPBState *s = ASPEED_APB2OPB(obj);
|
||||
|
||||
memcpy(s->regs, aspeed_apb2opb_reset, ASPEED_APB2OPB_NR_REGS);
|
||||
}
|
||||
@@ -312,10 +312,11 @@ static void fsi_aspeed_apb2opb_reset(DeviceState *dev)
|
||||
static void fsi_aspeed_apb2opb_class_init(ObjectClass *klass, const void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
ResettableClass *rc = RESETTABLE_CLASS(klass);
|
||||
|
||||
dc->desc = "ASPEED APB2OPB Bridge";
|
||||
dc->realize = fsi_aspeed_apb2opb_realize;
|
||||
device_class_set_legacy_reset(dc, fsi_aspeed_apb2opb_reset);
|
||||
rc->phases.hold = fsi_aspeed_apb2opb_reset_hold;
|
||||
}
|
||||
|
||||
static const TypeInfo aspeed_apb2opb_info = {
|
||||
|
||||
Reference in New Issue
Block a user