Patchwork [v3,16/16] isa: remove limitation of only one ISA bus

login
register
mail settings
Submitter Hervé Poussineau
Date Oct. 2, 2011, 4:10 p.m.
Message ID <1317571828-9059-17-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/117341/
State New
Headers show

Comments

Hervé Poussineau - Oct. 2, 2011, 4:10 p.m.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/isa-bus.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

Patch

diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index ab8dbe9..f01dfb2 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -22,7 +22,6 @@ 
 #include "isa.h"
 #include "exec-memory.h"
 
-static ISABus *isabus;
 target_phys_addr_t isa_mem_base = 0;
 
 static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent);
@@ -50,12 +49,8 @@  ISABus *isa_bus_bridge_init(MemoryRegion *address_space_io)
 
 void isa_bus_new(ISABus *bus, ISABusOps *ops, DeviceState *host)
 {
-    if (isabus) {
-        hw_error("Can't create a second ISA bus");
-    }
     qbus_create_inplace(&bus->qbus, &isa_bus_info, host, NULL);
     bus->ops = ops;
-    isabus = bus;
 }
 
 void isa_bus_irqs(ISABus *bus, qemu_irq *irqs)
@@ -63,7 +58,6 @@  void isa_bus_irqs(ISABus *bus, qemu_irq *irqs)
     if (!bus || !bus->ops->set_irqs) {
         hw_error("Tried to set isa irqs with no isa bus present.");
     }
-    assert(bus == isabus);
     bus->ops->set_irqs(bus, irqs);
 }
 
@@ -78,7 +72,6 @@  qemu_irq isa_get_irq(ISABus *bus, int isairq)
     if (!bus || !bus->ops->get_irq) {
         hw_error("ISA bus invalid");
     }
-    assert(bus == isabus);
     return bus->ops->get_irq(bus, isairq);
 }
 
@@ -119,7 +112,6 @@  void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start)
 {
     ISABus *bus = isa_bus_from_device(dev);
 
-    assert(bus == isabus);
     if (!bus || !bus->ops->get_io_space) {
         hw_error("Tried to register I/O port with no isa bus present.");
     }
@@ -157,7 +149,6 @@  ISADevice *isa_create(ISABus *bus, const char *name)
         hw_error("Tried to create isa device %s with no isa bus present.",
                  name);
     }
-    assert(bus == isabus);
     dev = qdev_create(&bus->qbus, name);
     return DO_UPCAST(ISADevice, qdev, dev);
 }
@@ -170,7 +161,6 @@  ISADevice *isa_try_create(ISABus *bus, const char *name)
         hw_error("Tried to create isa device %s with no isa bus present.",
                  name);
     }
-    assert(bus == isabus);
     dev = qdev_try_create(&bus->qbus, name);
     return DO_UPCAST(ISADevice, qdev, dev);
 }