isa: Add isa_unregister_ioport()

This commit is contained in:
haxar 2021-01-27 03:17:21 -08:00 committed by mborgerson
parent 56a47b0e58
commit c6ba6bf2be
2 changed files with 14 additions and 0 deletions

View File

@ -131,6 +131,14 @@ void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start)
isa_init_ioport(dev, start);
}
void isa_unregister_ioport(ISADevice *dev, MemoryRegion *io)
{
if (dev) {
dev->ioport_id = 0;
}
memory_region_del_subregion(isabus->address_space_io, io);
}
void isa_register_portio_list(ISADevice *dev,
PortioList *piolist, uint16_t start,
const MemoryRegionPortio *pio_start,

View File

@ -118,6 +118,12 @@ void isa_build_aml(ISABus *bus, Aml *scope);
*/
void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start);
/* XBOX */
/**
* isa_unregister_ioport: Uninstall an I/O port region on the ISA bus.
*/
void isa_unregister_ioport(ISADevice *dev, MemoryRegion *io);
/**
* isa_register_portio_list: Initialize a set of ISA io ports
*