qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC v2 7/8] pc: add EC qdev init for piix & q35


From: liguang
Subject: [Qemu-devel] [PATCH RFC v2 7/8] pc: add EC qdev init for piix & q35
Date: Thu, 6 Jun 2013 11:17:00 +0800

Signed-off-by: liguang <address@hidden>
---
 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 <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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]