aboutsummaryrefslogtreecommitdiff
path: root/include/hw/acpi/generic_event_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/acpi/generic_event_device.h')
-rw-r--r--include/hw/acpi/generic_event_device.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/generic_event_device.h
index 90a9180db5..1be05a3c0f 100644
--- a/include/hw/acpi/generic_event_device.h
+++ b/include/hw/acpi/generic_event_device.h
@@ -62,12 +62,14 @@
#include "hw/sysbus.h"
#include "hw/acpi/memory_hotplug.h"
#include "hw/acpi/ghes.h"
+#include "qom/object.h"
#define ACPI_POWER_BUTTON_DEVICE "PWRB"
#define TYPE_ACPI_GED "acpi-ged"
-#define ACPI_GED(obj) \
- OBJECT_CHECK(AcpiGedState, (obj), TYPE_ACPI_GED)
+typedef struct AcpiGedState AcpiGedState;
+DECLARE_INSTANCE_CHECKER(AcpiGedState, ACPI_GED,
+ TYPE_ACPI_GED)
#define ACPI_GED_EVT_SEL_OFFSET 0x0
#define ACPI_GED_EVT_SEL_LEN 0x4
@@ -90,7 +92,7 @@ typedef struct GEDState {
uint32_t sel;
} GEDState;
-typedef struct AcpiGedState {
+struct AcpiGedState {
SysBusDevice parent_obj;
MemHotplugState memhp_state;
MemoryRegion container_memhp;
@@ -98,7 +100,7 @@ typedef struct AcpiGedState {
uint32_t ged_event_bitmap;
qemu_irq irq;
AcpiGhesState ghes_state;
-} AcpiGedState;
+};
void build_ged_aml(Aml *table, const char* name, HotplugHandler *hotplug_dev,
uint32_t ged_irq, AmlRegionSpace rs, hwaddr ged_base);