From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Aurelien Jarno <aurelien@aurel32.net>,
Yongbok Kim <yongbok.kim@mips.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH v4 14/16] piix4: convert reset function to QOM
Date: Sat, 6 Jan 2018 16:37:28 +0100 [thread overview]
Message-ID: <20180106153730.30313-15-hpoussin@reactos.org> (raw)
In-Reply-To: <20180106153730.30313-1-hpoussin@reactos.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
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 b313e4fe73..159a27d2d9 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -56,10 +56,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;
@@ -234,7 +234,6 @@ static void piix4_realize(PCIDevice *pci_dev, Error **errp)
isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, RTC_ISA_IRQ);
piix4_dev = pci_dev;
- qemu_register_reset(piix4_reset, s);
}
static void piix4_init(Object *obj)
@@ -268,6 +267,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.11.0
next prev parent reply other threads:[~2018-01-06 15:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 15:37 [Qemu-devel] [PATCH v4 00/16] piix4: cleanup and improvements Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 01/16] fdc: move object structures to header file Hervé Poussineau
2018-01-15 23:07 ` John Snow
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 02/16] serial/parallel: " Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 03/16] mc146818rtc: move structure " Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 04/16] mc146818rtc: always register rtc to rtc list Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 05/16] piix4: rename some variables in realize function Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 06/16] piix4: add Reset Control Register Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 07/16] piix4: add a i8259 interrupt controller as specified in datasheet Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 08/16] piix4: add a i8257 dma " Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 09/16] piix4: add a i8254 pit " Hervé Poussineau
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 10/16] piix4: add a i8042 keyboard/mouse " Hervé Poussineau
2018-01-07 16:51 ` Philippe Mathieu-Daudé
2018-01-08 2:18 ` Philippe Mathieu-Daudé
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 11/16] piix4: add a floppy controller, 1 parallel port and 2 serial ports Hervé Poussineau
2018-01-07 16:57 ` Philippe Mathieu-Daudé
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 12/16] piix4: add a mc146818rtc controller as specified in datasheet Hervé Poussineau
2019-04-23 21:58 ` Philippe Mathieu-Daudé
2019-04-23 21:58 ` Philippe Mathieu-Daudé
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 13/16] piix4: add a speaker " Hervé Poussineau
2018-01-06 15:37 ` Hervé Poussineau [this message]
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 15/16] piix4: rename PIIX4 object to piix4-isa Hervé Poussineau
2018-01-07 16:38 ` Philippe Mathieu-Daudé
2018-01-06 15:37 ` [Qemu-devel] [PATCH v4 16/16] piix4: we can now instanciate a PIIX4 with -device Hervé Poussineau
2018-01-08 2:21 ` [Qemu-devel] [PATCH v4 00/16] piix4: cleanup and improvements Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180106153730.30313-15-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=aurelien@aurel32.net \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yongbok.kim@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).