* [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML
@ 2022-02-09 19:15 Bernhard Beschow
2022-02-09 21:56 ` Philippe Mathieu-Daudé via
2022-02-11 16:37 ` Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Bernhard Beschow @ 2022-02-09 19:15 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, John Snow, Hanna Reitz, Bernhard Beschow,
open list:Floppy
Other ISA devices such as serial-isa use the properties in their
build_aml functions. fdc-isa not using them is probably an oversight.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/block/fdc-isa.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index 3bf64e0665..ab663dce93 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -216,6 +216,7 @@ int cmos_get_fd_drive_type(FloppyDriveType fd0)
static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
{
+ FDCtrlISABus *isa = ISA_FDC(isadev);
Aml *dev;
Aml *crs;
int i;
@@ -227,11 +228,13 @@ static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
};
crs = aml_resource_template();
- aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04));
- aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01));
- aml_append(crs, aml_irq_no_flags(6));
aml_append(crs,
- aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2));
+ aml_io(AML_DECODE16, isa->iobase + 2, isa->iobase + 2, 0x00, 0x04));
+ aml_append(crs,
+ aml_io(AML_DECODE16, isa->iobase + 7, isa->iobase + 7, 0x00, 0x01));
+ aml_append(crs, aml_irq_no_flags(isa->irq));
+ aml_append(crs,
+ aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, isa->dma));
dev = aml_device("FDC0");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700")));
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML
2022-02-09 19:15 [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML Bernhard Beschow
@ 2022-02-09 21:56 ` Philippe Mathieu-Daudé via
2022-02-11 16:37 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-02-09 21:56 UTC (permalink / raw)
To: Bernhard Beschow, qemu-devel, Gerd Hoffmann
Cc: Kevin Wolf, John Snow, Hanna Reitz, open list:Floppy
On 9/2/22 20:15, Bernhard Beschow wrote:
> Other ISA devices such as serial-isa use the properties in their
> build_aml functions. fdc-isa not using them is probably an oversight.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
> hw/block/fdc-isa.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
> index 3bf64e0665..ab663dce93 100644
> --- a/hw/block/fdc-isa.c
> +++ b/hw/block/fdc-isa.c
> @@ -216,6 +216,7 @@ int cmos_get_fd_drive_type(FloppyDriveType fd0)
>
> static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
> {
> + FDCtrlISABus *isa = ISA_FDC(isadev);
> Aml *dev;
> Aml *crs;
> int i;
> @@ -227,11 +228,13 @@ static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
> };
>
> crs = aml_resource_template();
> - aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04));
> - aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01));
> - aml_append(crs, aml_irq_no_flags(6));
> aml_append(crs,
> - aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2));
> + aml_io(AML_DECODE16, isa->iobase + 2, isa->iobase + 2, 0x00, 0x04));
> + aml_append(crs,
> + aml_io(AML_DECODE16, isa->iobase + 7, isa->iobase + 7, 0x00, 0x01));
> + aml_append(crs, aml_irq_no_flags(isa->irq));
> + aml_append(crs,
> + aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, isa->dma));
>
> dev = aml_device("FDC0");
> aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700")));
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML
2022-02-09 19:15 [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML Bernhard Beschow
2022-02-09 21:56 ` Philippe Mathieu-Daudé via
@ 2022-02-11 16:37 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2022-02-11 16:37 UTC (permalink / raw)
To: Bernhard Beschow; +Cc: Hanna Reitz, John Snow, qemu-devel, open list:Floppy
Am 09.02.2022 um 20:15 hat Bernhard Beschow geschrieben:
> Other ISA devices such as serial-isa use the properties in their
> build_aml functions. fdc-isa not using them is probably an oversight.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-11 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 19:15 [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML Bernhard Beschow
2022-02-09 21:56 ` Philippe Mathieu-Daudé via
2022-02-11 16:37 ` Kevin Wolf
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).