mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
acpi: mc146818rtc: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220608135340.3304695-7-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
0d170dc13c
commit
d9cf178cc0
@ -26,7 +26,7 @@
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/bcd.h"
|
||||
#include "hw/acpi/aml-build.h"
|
||||
#include "hw/acpi/acpi_aml_interface.h"
|
||||
#include "hw/irq.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/qdev-properties-system.h"
|
||||
@ -1017,9 +1017,9 @@ static void rtc_reset_hold(Object *obj)
|
||||
qemu_irq_lower(s->irq);
|
||||
}
|
||||
|
||||
static void rtc_build_aml(ISADevice *isadev, Aml *scope)
|
||||
static void rtc_build_aml(AcpiDevAmlIf *adev, Aml *scope)
|
||||
{
|
||||
RTCState *s = MC146818_RTC(isadev);
|
||||
RTCState *s = MC146818_RTC(adev);
|
||||
Aml *dev;
|
||||
Aml *crs;
|
||||
|
||||
@ -1043,13 +1043,13 @@ static void rtc_class_initfn(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
ResettableClass *rc = RESETTABLE_CLASS(klass);
|
||||
ISADeviceClass *isa = ISA_DEVICE_CLASS(klass);
|
||||
AcpiDevAmlIfClass *adevc = ACPI_DEV_AML_IF_CLASS(klass);
|
||||
|
||||
dc->realize = rtc_realizefn;
|
||||
dc->vmsd = &vmstate_rtc;
|
||||
rc->phases.enter = rtc_reset_enter;
|
||||
rc->phases.hold = rtc_reset_hold;
|
||||
isa->build_aml = rtc_build_aml;
|
||||
adevc->build_dev_aml = rtc_build_aml;
|
||||
device_class_set_props(dc, mc146818rtc_properties);
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
}
|
||||
@ -1059,6 +1059,10 @@ static const TypeInfo mc146818rtc_info = {
|
||||
.parent = TYPE_ISA_DEVICE,
|
||||
.instance_size = sizeof(RTCState),
|
||||
.class_init = rtc_class_initfn,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ TYPE_ACPI_DEV_AML_IF },
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void mc146818rtc_register_types(void)
|
||||
|
Loading…
Reference in New Issue
Block a user