Skip to contentSkip to conversation

i8257: Make device "i8257" unavailable with -device

PATCH Applied Markus Armbruster 2 participants 2 messages Aug 31, 2016 – Sep 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i8257: Make device "i8257" unavailable with -device

The ISA DMA controller needs to be wired up to the ISA bus by isa_bus_dma() to actually work.

---
 hw/dma/i8257.c | 2 ++
 1 file changed, 2 insertions(+)
hw/dma/i8257.c +2 -0
index f345c54..f90df1d 100644
@@ -598,6 +598,8 @@ static void i8257_class_init(ObjectClass *klass, void *data)
     idc->release_DREQ = i8257_dma_release_DREQ;
     idc->schedule = i8257_dma_schedule;
     idc->register_channel = i8257_dma_register_channel;
+    /* Reason: needs to be wired up by isa_bus_dma() to work */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo i8257_info = {
Signature · 1 line
2.5.5
#1 lore raw
Quoted 14 lines · Markus Armbruster

The ISA DMA controller needs to be wired up to the ISA bus by isa_bus_dma() to actually work.

---
 hw/dma/i8257.c | 2 ++
 1 file changed, 2 insertions(+)
hw/dma/i8257.c +0 -0
index f345c54..f90df1d 100644

hw/dma/i8257.c static void i8257_class_init(ObjectClass *klass, void *data) · line 605

Quoted 8 lines
hw/dma/i8257.c +2 -0
@@ -598,6 +598,8 @@ static void i8257_class_init(ObjectClass *klass, void *data)
     idc->release_DREQ = i8257_dma_release_DREQ;
     idc->schedule = i8257_dma_schedule;
     idc->register_channel = i8257_dma_register_channel;
+    /* Reason: needs to be wired up by isa_bus_dma() to work */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo i8257_info = {

Queued for 2.8, thanks.

Paolo