From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <andreas.faerber@web.de>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [RFC 4/6] m48t59: move ISA ports registration to QOM constructor
Date: Thu, 14 Mar 2013 23:12:05 +0100 [thread overview]
Message-ID: <1363299128-8494-5-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1363299128-8494-1-git-send-email-hpoussin@reactos.org>
-device m48t59 can now be used to create a fully functional nvram,
and m48t59_init_isa() becomes a much simpler helper.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/m48t59.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 39a9d80..1093716 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -676,11 +676,6 @@ M48t59State *m48t59_init_isa(ISABus *bus, uint32_t io_base, uint16_t size,
d = DO_UPCAST(M48t59ISAState, busdev, dev);
s = &d->state;
- memory_region_init_io(&d->io, &m48t59_io_ops, s, "m48t59", 4);
- if (io_base != 0) {
- isa_register_ioport(dev, &d->io, io_base);
- }
-
return s;
}
@@ -703,6 +698,10 @@ static int m48t59_init_isa1(ISADevice *dev)
isa_init_irq(dev, &s->IRQ, 8);
m48t59_init_common(s);
+ memory_region_init_io(&d->io, &m48t59_io_ops, s, "m48t59", 4);
+ if (s->io_base != 0) {
+ isa_register_ioport(dev, &d->io, s->io_base);
+ }
return 0;
}
--
1.7.10.4
next prev parent reply other threads:[~2013-03-14 22:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 22:12 [Qemu-devel] [RFC 0/6] ppc/prep: add IBM RS/6000 43p machine Hervé Poussineau
2013-03-14 22:12 ` [Qemu-devel] [RFC 1/6] pci: add MPC105 PCI host bridge emulation Hervé Poussineau
2013-03-14 22:12 ` [Qemu-devel] [RFC 2/6] prep: add IBM RS/6000 7248 (43p) machine emulation Hervé Poussineau
2013-03-14 22:12 ` [Qemu-devel] [RFC 3/6] prep: add RS/6000 debug device Hervé Poussineau
2013-03-14 22:12 ` Hervé Poussineau [this message]
2013-03-14 22:12 ` [Qemu-devel] [RFC 5/6] m48t59: hack(?) to make it work on IBM 43p Hervé Poussineau
2013-03-14 22:12 ` [Qemu-devel] [RFC 6/6] prep: QOM'ify System I/O Hervé Poussineau
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=1363299128-8494-5-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=andreas.faerber@web.de \
--cc=qemu-devel@nongnu.org \
/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).