qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v6 07/11] intel-hda: change msi property type


From: Cao jin
Subject: [Qemu-devel] [PATCH v6 07/11] intel-hda: change msi property type
Date: Tue, 24 May 2016 12:04:45 +0800

>From uint32 to enum OnOffAuto.

cc: Gerd Hoffmann <address@hidden>
cc: Michael S. Tsirkin <address@hidden>
cc: Markus Armbruster <address@hidden>
cc: Marcel Apfelbaum <address@hidden>

Signed-off-by: Cao jin <address@hidden>
---
 hw/audio/intel-hda.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index d372d4a..61362e5 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -187,7 +187,7 @@ struct IntelHDAState {
 
     /* properties */
     uint32_t debug;
-    uint32_t msi;
+    OnOffAuto msi;
     bool old_msi_addr;
 };
 
@@ -1142,7 +1142,8 @@ static void intel_hda_realize(PCIDevice *pci, Error 
**errp)
     memory_region_init_io(&d->mmio, OBJECT(d), &intel_hda_mmio_ops, d,
                           "intel-hda", 0x4000);
     pci_register_bar(&d->pci, 0, 0, &d->mmio);
-    if (d->msi) {
+    if (d->msi == ON_OFF_AUTO_AUTO ||
+        d->msi == ON_OFF_AUTO_ON) {
         msi_init(&d->pci, d->old_msi_addr ? 0x50 : 0x60, 1, true, false);
     }
 
@@ -1234,7 +1235,7 @@ static const VMStateDescription vmstate_intel_hda = {
 
 static Property intel_hda_properties[] = {
     DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
-    DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1),
+    DEFINE_PROP_ON_OFF_AUTO("msi", IntelHDAState, msi, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false),
     DEFINE_PROP_END_OF_LIST(),
 };
-- 
2.1.0






reply via email to

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