[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset |
Date: |
Thu, 26 Sep 2019 17:17:26 +0200 |
Convert the reset handler into a proper Device reset method.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/pci-host/piix.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 135c645535..a1cd8b8406 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -36,7 +36,6 @@
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "hw/pci-host/pam.h"
-#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/i386/ioapic.h"
#include "qapi/visitor.h"
@@ -562,9 +561,9 @@ static void piix3_write_config_xen(PCIDevice *dev,
piix3_write_config(dev, address, val, len);
}
-static void piix3_reset(void *opaque)
+static void piix3_reset(DeviceState *dev)
{
- PIIX3State *d = opaque;
+ PIIX3State *d = PIIX3_PCI_DEVICE(dev);
uint8_t *pci_conf = d->dev.config;
pci_conf[0x04] = 0x07; /* master, memory and I/O */
@@ -711,8 +710,6 @@ static void piix3_realize(PCIDevice *dev, Error **errp)
"piix3-reset-control", 1);
memory_region_add_subregion_overlap(pci_address_space_io(dev), RCR_IOPORT,
&d->rcr_mem, 1);
-
- qemu_register_reset(piix3_reset, d);
}
static void pci_piix3_class_init(ObjectClass *klass, void *data)
@@ -723,6 +720,7 @@ static void pci_piix3_class_init(ObjectClass *klass, void
*data)
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix3;
dc->hotpluggable = false;
+ dc->reset = piix3_reset;
k->realize = piix3_realize;
k->vendor_id = PCI_VENDOR_ID_INTEL;
/* 82371SB PIIX3 PCI-to-ISA bridge (Step A1) */
--
2.20.1
- [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 01/11] hw/acpi/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 02/11] hw/ide/piix: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 03/11] hw/isa/piix4: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 04/11] hw/pci-host/piix: Convert reset handler to DeviceReset,
Philippe Mathieu-Daudé <=
- [PATCH 05/11] hw/ide/sii3112: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 07/11] hw/isa/vt82c686: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 06/11] hw/ide/via82c: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 09/11] hw/pci-host/bonito: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 08/11] hw/input/lm832x: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 11/11] hw/misc/vmcoreinfo: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 10/11] hw/timer/etraxfs: Convert reset handler to DeviceReset, Philippe Mathieu-Daudé, 2019/09/26
- Re: [PATCH 00/11] hw: Convert various reset() handler to DeviceReset, no-reply, 2019/09/27