Signed-off-by: liguang <lig.f...@cn.fujitsu.com> --- hw/i386/pc_piix.c | 6 ++++++ hw/i386/pc_q35.c | 5 +++++ 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index f1eb791..e3362b8 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -46,6 +46,8 @@ #include "exec/address-spaces.h" #include "hw/acpi/acpi.h" #include "cpu.h" +#include "hw/acpi/ec.h" + #ifdef CONFIG_XEN # include <xen/hvm/hvm_info_table.h> #endif @@ -229,6 +231,10 @@ static void pc_init1(MemoryRegion *system_memory, if (has_pvpanic) { pvpanic_init(isa_bus); } + + if (qemu_ec_enabled()) { + ec_dev_init(isa_bus); + } } static void pc_init_pci(QEMUMachineInitArgs *args) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index f171ed3..9c2d3b1 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -42,6 +42,7 @@ #include "hw/ide/ahci.h" #include "hw/usb.h" #include "hw/cpu/icc_bus.h" +#include "hw/acpi/ec.h" /* ICH9 AHCI has 6 ports */ #define MAX_SATA_PORTS 6 @@ -206,6 +207,10 @@ static void pc_q35_init(QEMUMachineInitArgs *args) if (has_pvpanic) { pvpanic_init(isa_bus); } + + if (qemu_ec_enabled()) { + ec_dev_init(isa_bus); + } } static void pc_q35_init_1_4(QEMUMachineInitArgs *args) -- 1.7.2.5