mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
9c6c0aeacd
Frees isa-bus.c from implicit ACPI dependency. While at it, resolve open coding of qbus_build_aml() in piix3 and ich9. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20230121151941.24120-3-shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
#include "qemu/osdep.h"
|
|
#include "hw/acpi/acpi_dev_interface.h"
|
|
#include "hw/acpi/acpi_aml_interface.h"
|
|
#include "qemu/module.h"
|
|
#include "qemu/queue.h"
|
|
|
|
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
|
|
{
|
|
AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
|
|
if (adevc->send_event) {
|
|
AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
|
|
adevc->send_event(adev, event);
|
|
}
|
|
}
|
|
|
|
void qbus_build_aml(BusState *bus, Aml *scope)
|
|
{
|
|
BusChild *kid;
|
|
|
|
QTAILQ_FOREACH(kid, &bus->children, sibling) {
|
|
call_dev_aml_func(DEVICE(kid->child), scope);
|
|
}
|
|
}
|
|
|
|
static void register_types(void)
|
|
{
|
|
static const TypeInfo acpi_dev_if_info = {
|
|
.name = TYPE_ACPI_DEVICE_IF,
|
|
.parent = TYPE_INTERFACE,
|
|
.class_size = sizeof(AcpiDeviceIfClass),
|
|
};
|
|
static const TypeInfo acpi_dev_aml_if_info = {
|
|
.name = TYPE_ACPI_DEV_AML_IF,
|
|
.parent = TYPE_INTERFACE,
|
|
.class_size = sizeof(AcpiDevAmlIfClass),
|
|
};
|
|
|
|
|
|
type_register_static(&acpi_dev_if_info);
|
|
type_register_static(&acpi_dev_aml_if_info);
|
|
}
|
|
|
|
type_init(register_types)
|