From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, "Andreas Färber" <andreas.faerber@web.de>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Markus Armbruster" <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH 4/6] fdc: Parametrize ISA base, IRQ and DMA
Date: Sat, 17 Mar 2012 15:39:44 +0100 [thread overview]
Message-ID: <1331995186-18507-5-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1331995186-18507-1-git-send-email-hpoussin@reactos.org>
Keep the PC values as defaults but allow to override them for PReP.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
hw/fdc.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c
index a0236b7..756d4ce 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -438,6 +438,9 @@ typedef struct FDCtrlSysBus {
typedef struct FDCtrlISABus {
ISADevice busdev;
+ uint32_t iobase;
+ uint32_t irq;
+ uint32_t dma;
struct FDCtrl state;
int32_t bootindexA;
int32_t bootindexB;
@@ -1971,17 +1974,14 @@ static int isabus_fdc_init1(ISADevice *dev)
{
FDCtrlISABus *isa = DO_UPCAST(FDCtrlISABus, busdev, dev);
FDCtrl *fdctrl = &isa->state;
- int iobase = 0x3f0;
- int isairq = 6;
- int dma_chann = 2;
int ret;
- isa_register_portio_list(dev, iobase, fdc_portio_list, fdctrl, "fdc");
+ isa_register_portio_list(dev, isa->iobase, fdc_portio_list, fdctrl, "fdc");
- isa_init_irq(&isa->busdev, &fdctrl->irq, isairq);
- fdctrl->dma_chann = dma_chann;
+ isa_init_irq(&isa->busdev, &fdctrl->irq, isa->irq);
+ fdctrl->dma_chann = isa->dma;
- qdev_set_legacy_instance_id(&dev->qdev, iobase, 2);
+ qdev_set_legacy_instance_id(&dev->qdev, isa->iobase, 2);
ret = fdctrl_init_common(fdctrl);
add_boot_device_path(isa->bootindexA, &dev->qdev, "/floppy@0");
@@ -2046,6 +2046,9 @@ static const VMStateDescription vmstate_isa_fdc ={
};
static Property isa_fdc_properties[] = {
+ DEFINE_PROP_HEX32("iobase", FDCtrlISABus, iobase, 0x3f0),
+ DEFINE_PROP_UINT32("irq", FDCtrlISABus, irq, 6),
+ DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2),
DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].bs),
DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].bs),
DEFINE_PROP_INT32("bootindexA", FDCtrlISABus, bootindexA, -1),
--
1.7.9.1
next prev parent reply other threads:[~2012-03-17 14:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-17 14:39 [Qemu-devel] [PATCH 0/6] prep: some fixes and Super I/O emulation Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 1/6] i82378/i82374: do not create DMA controller twice Hervé Poussineau
2012-03-19 11:03 ` Andreas Färber
2012-03-19 11:23 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2012-03-19 12:19 ` Andreas Färber
2012-03-19 12:21 ` Alexander Graf
2012-03-17 14:39 ` [Qemu-devel] [PATCH 2/6] prep: change default cpu to '7448' Hervé Poussineau
2012-03-19 12:53 ` Andreas Färber
2012-03-19 21:01 ` Hervé Poussineau
2012-03-19 21:02 ` Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 3/6] isa: add isa_bus_from_device() method Hervé Poussineau
2012-03-17 14:39 ` Hervé Poussineau [this message]
2012-03-21 17:22 ` [Qemu-devel] [PATCH 4/6] fdc: Parametrize ISA base, IRQ and DMA Markus Armbruster
2012-03-17 14:39 ` [Qemu-devel] [PATCH 5/6] prep: add pc87312 Super I/O emulation Hervé Poussineau
2012-03-19 13:15 ` Andreas Färber
2012-03-19 18:26 ` Hervé Poussineau
2012-03-17 14:39 ` [Qemu-devel] [PATCH 6/6] prep: use pc87312 Super I/O chip instead of collection of random ISA devices Hervé Poussineau
2012-03-17 17:33 ` Paolo Bonzini
2012-06-01 14:22 ` [Qemu-devel] [PATCH 0/6] prep: some fixes and Super I/O emulation Artyom Tarasenko
2012-06-01 19:38 ` 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=1331995186-18507-5-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=andreas.faerber@web.de \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).