[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/29] piix4: convert reset function to QOM
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 13/29] piix4: convert reset function to QOM |
Date: |
Sun, 7 Jan 2018 23:45:42 -0300 |
From: Hervé Poussineau <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Hervé Poussineau <address@hidden>
---
hw/isa/piix4.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 7b231b704b..314f7f7359 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -39,10 +39,10 @@ typedef struct PIIX4State {
#define PIIX4_PCI_DEVICE(obj) \
OBJECT_CHECK(PIIX4State, (obj), TYPE_PIIX4_PCI_DEVICE)
-static void piix4_reset(void *opaque)
+static void piix4_reset(DeviceState *dev)
{
- PIIX4State *d = opaque;
- uint8_t *pci_conf = d->dev.config;
+ PIIX4State *s = PIIX4_PCI_DEVICE(dev);
+ uint8_t *pci_conf = s->dev.config;
pci_conf[0x04] = 0x07; // master, memory and I/O
pci_conf[0x05] = 0x00;
@@ -97,7 +97,6 @@ static void piix4_realize(PCIDevice *pci_dev, Error **errp)
return;
}
piix4_dev = pci_dev;
- qemu_register_reset(piix4_reset, s);
}
int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
@@ -118,6 +117,7 @@ static void piix4_class_init(ObjectClass *klass, void *data)
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371AB_0;
k->class_id = PCI_CLASS_BRIDGE_ISA;
+ dc->reset = piix4_reset;
dc->desc = "ISA bridge";
dc->vmsd = &vmstate_piix4;
/*
--
2.15.1
- [Qemu-devel] [PATCH 06/29] hw/isa: add a generic isa_superio_init(), (continued)
- [Qemu-devel] [PATCH 06/29] hw/isa: add a generic isa_superio_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 05/29] hw/input/i8042: extract declarations from i386/pc.h into input/i8042.h, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 07/29] hw/i386/pc: use isa_superio_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 08/29] hw/mips/fulong2e: use isa_superio_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 09/29] hw/mips/malta: code movement, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 10/29] hw/mips/malta: add fdc37m81x_init() which uses isa_superio_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 11/29] mc146818rtc: always register rtc to rtc list, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 12/29] piix4: rename some variables in realize function, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 13/29] piix4: convert reset function to QOM,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 14/29] piix4: add Reset Control Register, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 15/29] piix4: add a i8259 interrupt controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [RFC PATCH 16/29] Revert "irq: introduce qemu_irq_proxy()", Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 17/29] piix: move piix4 declaration into new southbridge/i82371_piix.h, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 18/29] piix4: add a i8257 dma controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 19/29] piix4: add a i8254 pit controller as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 20/29] piix4: add a speaker as specified in datasheet, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 21/29] piix: move southbridge related declarations/definitions to i82371_piix.h, Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 22/29] piix3: extract piix3_init() from i440fx_init(), Philippe Mathieu-Daudé, 2018/01/07
- [Qemu-devel] [PATCH 23/29] hw/i386: extract i440fx related declarations/definitions to i440fx.h, Philippe Mathieu-Daudé, 2018/01/07