[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 2/7] m48t59: move ISA ports registration to QOM con
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [RFC v2 2/7] m48t59: move ISA ports registration to QOM constructor |
Date: |
Sun, 14 Apr 2013 10:05:55 +0200 |
-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 <address@hidden>
---
hw/timer/m48t59.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
index 5019e06..41022f2 100644
--- a/hw/timer/m48t59.c
+++ b/hw/timer/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
- [Qemu-devel] [RFC v2 0/7] ppc/prep: add IBM RS/6000 43p machine, Hervé Poussineau, 2013/04/14
- [Qemu-devel] [RFC v2 2/7] m48t59: move ISA ports registration to QOM constructor,
Hervé Poussineau <=
- [Qemu-devel] [RFC v2 1/7] pci: add MPC105 PCI host bridge emulation, Hervé Poussineau, 2013/04/14
- [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Hervé Poussineau, 2013/04/14
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Artyom Tarasenko, 2013/04/14
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Hervé Poussineau, 2013/04/15
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Blue Swirl, 2013/04/20
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Artyom Tarasenko, 2013/04/20
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Blue Swirl, 2013/04/20
- Re: [Qemu-devel] [RFC v2 3/7] m48t59: register a QOM type for each nvram type we support, Artyom Tarasenko, 2013/04/27
[Qemu-devel] [RFC v2 4/7] m48t59: use DeviceState in public functions, Hervé Poussineau, 2013/04/14
[Qemu-devel] [RFC v2 5/7] prep: add IBM RS/6000 7248 (43p) machine emulation, Hervé Poussineau, 2013/04/14