Received: from eggs.gnu.org ([2001:4830:134:3::10]:37065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkQik-0002Cn-Gv for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkQij-0004B5-Ig for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:18:38 -0400 Received: from [222.73.24.84] (port=46456 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkQii-0004A8-Aw for qemu-devel@nongnu.org; Wed, 05 Jun 2013 23:18:37 -0400 From: liguang Date: Thu, 6 Jun 2013 11:17:00 +0800 Message-Id: <1370488621-6915-8-git-send-email-lig.fnst@cn.fujitsu.com> In-Reply-To: <1370488621-6915-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1370488621-6915-1-git-send-email-lig.fnst@cn.fujitsu.com> Subject: [Qemu-devel] [PATCH RFC v2 7/8] pc: add EC qdev init for piix & q35 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: Kevin Wolf , Alexander Graf , Anthony Liguori , Stefan Berger , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Christian Borntraeger , Markus Armbruster , Joel Schopp , Gerd Hoffmann , Paolo Bonzini , Luiz Capitulino , Laszlo Ersek , =?UTF-8?q?Andreas=20F=C3=A4rber?= , liguang , Isaku Yamahata Signed-off-by: liguang --- 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 71ce2ff..378c980 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 #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