* [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ
@ 2010-12-26 2:33 Andreas Färber
2011-01-28 12:41 ` Markus Armbruster
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2010-12-26 2:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber, Hervé Poussineau
From: Hervé Poussineau <hpoussin@reactos.org>
v1:
* Rebased.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
This patch allows to adapt the floppy device for the PReP Super I/O.
hw/fdc.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c
index 4bbcc47..2d834f5 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -523,6 +523,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;
@@ -1973,26 +1976,23 @@ 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;
- register_ioport_read(iobase + 0x01, 5, 1,
+ register_ioport_read(isa->iobase + 0x01, 5, 1,
&fdctrl_read_port, fdctrl);
- register_ioport_read(iobase + 0x07, 1, 1,
+ register_ioport_read(isa->iobase + 0x07, 1, 1,
&fdctrl_read_port, fdctrl);
- register_ioport_write(iobase + 0x01, 5, 1,
+ register_ioport_write(isa->iobase + 0x01, 5, 1,
&fdctrl_write_port, fdctrl);
- register_ioport_write(iobase + 0x07, 1, 1,
+ register_ioport_write(isa->iobase + 0x07, 1, 1,
&fdctrl_write_port, fdctrl);
- isa_init_ioport_range(dev, iobase, 6);
- isa_init_ioport(dev, iobase + 7);
+ isa_init_ioport_range(dev, isa->iobase, 6);
+ isa_init_ioport(dev, isa->iobase + 7);
- 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");
@@ -2057,6 +2057,9 @@ static ISADeviceInfo isa_fdc_info = {
.qdev.vmsd = &vmstate_isa_fdc,
.qdev.reset = fdctrl_external_reset_isa,
.qdev.props = (Property[]) {
+ 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.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ
2010-12-26 2:33 [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ Andreas Färber
@ 2011-01-28 12:41 ` Markus Armbruster
2011-01-30 13:04 ` Andreas Färber
0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2011-01-28 12:41 UTC (permalink / raw)
To: Andreas Färber; +Cc: Hervé Poussineau, qemu-devel
Andreas Färber <andreas.faerber@web.de> writes:
> From: Hervé Poussineau <hpoussin@reactos.org>
>
> v1:
> * Rebased.
Patch versioning goes below the --- line, so it doesn't end up in git.
>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> ---
> This patch allows to adapt the floppy device for the PReP Super I/O.
Have we seen code for that?
Patch rationale goes above the --- line, so it does end up in git.
>
> hw/fdc.c | 27 +++++++++++++++------------
> 1 files changed, 15 insertions(+), 12 deletions(-)
Patch looks good.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ
2011-01-28 12:41 ` Markus Armbruster
@ 2011-01-30 13:04 ` Andreas Färber
2011-01-31 8:12 ` Markus Armbruster
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2011-01-30 13:04 UTC (permalink / raw)
To: Markus Armbruster; +Cc: Hervé Poussineau, qemu-devel
Am 28.01.2011 um 13:41 schrieb Markus Armbruster:
> Andreas Färber <andreas.faerber@web.de> writes:
>
>> From: Hervé Poussineau <hpoussin@reactos.org>
>>
>> v1:
>> * Rebased.
>
> Patch versioning goes below the --- line, so it doesn't end up in git.
I disagree: I always put it into the commit message, so that we can
see which version got committed and so that those that contributed
ideas get credited.
In this case we can just scratch it.
>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
>> ---
>> This patch allows to adapt the floppy device for the PReP Super I/O.
>
> Have we seen code for that?
>
> Patch rationale goes above the --- line, so it does end up in git.
It wasn't intended as such, since the Super I/O still depends on some
controversial patches to PCI and qdev.
My WIP (based on Hervé's ppc branch) is here:
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/prep
>>
>> hw/fdc.c | 27 +++++++++++++++------------
>> 1 files changed, 15 insertions(+), 12 deletions(-)
>
> Patch looks good.
Thanks, will repost.
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ
2011-01-30 13:04 ` Andreas Färber
@ 2011-01-31 8:12 ` Markus Armbruster
0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2011-01-31 8:12 UTC (permalink / raw)
To: Andreas Färber; +Cc: Hervé Poussineau, qemu-devel
Andreas Färber <andreas.faerber@web.de> writes:
> Am 28.01.2011 um 13:41 schrieb Markus Armbruster:
>
>> Andreas Färber <andreas.faerber@web.de> writes:
>>
>>> From: Hervé Poussineau <hpoussin@reactos.org>
>>>
>>> v1:
>>> * Rebased.
>>
>> Patch versioning goes below the --- line, so it doesn't end up in git.
>
> I disagree: I always put it into the commit message, so that we can
> see which version got committed and so that those that contributed
> ideas get credited.
When patch history contains bits that should be preserved for posterity,
I recommend working them into the commit message proper.
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-31 8:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-26 2:33 [Qemu-devel] [PATCH] floppy: Parametrize ISA base and IRQ Andreas Färber
2011-01-28 12:41 ` Markus Armbruster
2011-01-30 13:04 ` Andreas Färber
2011-01-31 8:12 ` Markus Armbruster
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).