@@ -1760,6 +1760,14 @@ void ide_init_ioport(IDEBus *bus, int iobase, int iobase2)
register_ioport_read(iobase, 4, 4, ide_data_readl, bus);
}
+void ide_discard_ioport(int iobase, int iobase2)
+{
+ isa_unassign_ioport(iobase, 8);
+ if (iobase2 != 0) {
+ isa_unassign_ioport(iobase2, 1);
+ }
+}
+
static bool is_identify_set(void *opaque, int version_id)
{
IDEState *s = opaque;
@@ -564,6 +564,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq);
void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0,
DriveInfo *hd1, qemu_irq irq);
void ide_init_ioport(IDEBus *bus, int iobase, int iobase2);
+void ide_discard_ioport(int iobase, int iobase2);
void ide_exec_cmd(IDEBus *bus, uint32_t val);
void ide_dma_cb(void *opaque, int ret);
Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- hw/ide/core.c | 8 ++++++++ hw/ide/internal.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-)