@@ -2611,6 +2611,7 @@ F: hw/ide/ich.c
F: hw/isa/lpc_ich9.c
F: hw/southbridge/ich9.c
F: include/hw/acpi/ich9*.h
+F: include/hw/i2c/smbus_ich9.h
F: include/hw/ide/ahci-pci.h
F: include/hw/pci-bridge/ich_dmi_pci.h
F: include/hw/southbridge/ich9.h
new file mode 100644
@@ -0,0 +1,25 @@
+/*
+ * QEMU ICH9 SMBus emulation
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef HW_I2C_SMBUS_ICH9_H
+#define HW_I2C_SMBUS_ICH9_H
+
+#include "qom/object.h"
+#include "hw/pci/pci_device.h"
+#include "hw/i2c/pm_smbus.h"
+
+#define TYPE_ICH9_SMB_DEVICE "ICH9-SMB"
+
+OBJECT_DECLARE_SIMPLE_TYPE(ICH9SMBState, ICH9_SMB_DEVICE)
+
+struct ICH9SMBState {
+ PCIDevice dev;
+
+ bool irq_enabled;
+
+ PMSMBus smb;
+};
+
+#endif
@@ -1,5 +1,5 @@
/*
- * ACPI implementation
+ * QEMU ICH9 SMBus emulation
*
* Copyright (c) 2006 Fabrice Bellard
* Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
@@ -22,8 +22,7 @@
#include "qemu/osdep.h"
#include "qemu/range.h"
-#include "hw/i2c/pm_smbus.h"
-#include "hw/pci/pci.h"
+#include "hw/i2c/smbus_ich9.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
@@ -31,16 +30,6 @@
#include "qom/object.h"
#include "hw/acpi/acpi_aml_interface.h"
-OBJECT_DECLARE_SIMPLE_TYPE(ICH9SMBState, ICH9_SMB_DEVICE)
-
-struct ICH9SMBState {
- PCIDevice dev;
-
- bool irq_enabled;
-
- PMSMBus smb;
-};
-
static bool ich9_vmstate_need_smbus(void *opaque, int version_id)
{
return pm_smbus_vmstate_needed();
Expose TYPE_ICH9_SMB_DEVICE to the new "hw/i2c/smbus_ich9.h" header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- MAINTAINERS | 1 + include/hw/i2c/smbus_ich9.h | 25 +++++++++++++++++++++++++ hw/i2c/smbus_ich9.c | 15 ++------------- 3 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 include/hw/i2c/smbus_ich9.h