@@ -47,9 +47,22 @@ typedef struct I8257State {
} I8257State;
void i8257_dma_init_cascaded(ISABus *bus, bool high_page_enable);
-static inline void i8257_dma_init(ISABus *bus, bool high_page_enable)
+
+/**
+ * i8257_dma_init_pc_at: Install 8 DMA channels on the ISA bus.
+ *
+ * This is the PC/AT DMA implementation:
+ *
+ * Two i8257 controllers are created.
+ * The primary controller register channels [0..3] on the bus,
+ * the secondary controller (slave) is cascaded on the primary (master),
+ * registering channels [4..7].
+ *
+ * @bus: the #ISABus against which these are created.
+ */
+static inline void i8257_dma_init_pc_at(ISABus *bus)
{
- i8257_dma_init_cascaded(bus, high_page_enable);
+ i8257_dma_init_cascaded(bus, false);
}
#endif
@@ -1624,7 +1624,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
pcspk_init(isa_bus, pit);
}
- i8257_dma_init(isa_bus, 0);
+ i8257_dma_init_pc_at(isa_bus);
/* Super I/O */
pc_superio_init(isa_bus, create_fdctrl, no_vmport);
@@ -243,7 +243,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
isa_bus_irqs(isa_bus, i8259);
/* init other devices */
i8254_pit_init(isa_bus, 0x40, 0, NULL);
- i8257_dma_init(isa_bus, 0);
+ i8257_dma_init_pc_at(isa_bus);
/* Super I/O */
isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
@@ -222,7 +222,7 @@ static void mips_jazz_init(MachineState *machine,
/* ISA devices */
i8259 = i8259_init(isa_bus, env->irq[4]);
isa_bus_irqs(isa_bus, i8259);
- i8257_dma_init(isa_bus, 0);
+ i8257_dma_init_pc_at(isa_bus);
pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
pcspk_init(isa_bus, pit);
@@ -1198,7 +1198,7 @@ void mips_malta_init(MachineState *machine)
smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100,
isa_get_irq(NULL, 9), NULL, 0, NULL);
pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
- i8257_dma_init(isa_bus, 0);
+ i8257_dma_init_pc_at(isa_bus);
mc146818_rtc_init(isa_bus, 2000, NULL);
/* generate SPD EEPROM data */
Reflect that the PC/AT implementation is used. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- include/hw/dma/i8257.h | 17 +++++++++++++++-- hw/i386/pc.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-)