[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/20] piix4: Add an i8257 DMA Controller as specified in datashee
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 06/20] piix4: Add an i8257 DMA Controller as specified in datasheet |
Date: |
Mon, 28 Oct 2019 17:34:33 +0100 |
From: Hervé Poussineau <address@hidden>
The i8257 is not a chipset on the Malta board, but is part of
the PIIX4 chipset.
Create the i8257 in the PIIX4 code, remove the one instantiated
in malta board, to not have it twice.
Acked-by: Michael S. Tsirkin <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Hervé Poussineau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Esteban Bosse <address@hidden>
[PMD: rebased, reworded description]
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/isa/piix4.c | 4 ++++
hw/mips/mips_malta.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index fa387919b5..9ebe98bdc3 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -29,6 +29,7 @@
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
+#include "hw/dma/i8257.h"
#include "migration/vmstate.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
@@ -167,6 +168,9 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
/* initialize ISA irqs */
isa_bus_irqs(isa_bus, s->isa);
+ /* DMA */
+ i8257_dma_init(isa_bus, 0);
+
piix4_dev = dev;
}
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 5086024821..44e5f8b26b 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -28,7 +28,6 @@
#include "cpu.h"
#include "hw/i386/pc.h"
#include "hw/isa/superio.h"
-#include "hw/dma/i8257.h"
#include "hw/char/serial.h"
#include "net/net.h"
#include "hw/boards.h"
@@ -1430,7 +1429,6 @@ 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);
mc146818_rtc_init(isa_bus, 2000, NULL);
/* generate SPD EEPROM data */
--
2.21.0
- [PULL 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 01/20] MAINTAINERS: Keep PIIX4 South Bridge separate from PC Chipsets, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 02/20] piix4: Add the Reset Control Register, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 03/20] piix4: Add an i8259 Interrupt Controller as specified in datasheet, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 05/20] piix4: Rename PIIX4 object to piix4-isa, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 04/20] Revert "irq: introduce qemu_irq_proxy()", Philippe Mathieu-Daudé, 2019/10/28
- [PULL 06/20] piix4: Add an i8257 DMA Controller as specified in datasheet,
Philippe Mathieu-Daudé <=
- [PULL 07/20] piix4: Add an i8254 PIT Controller as specified in datasheet, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 09/20] hw/mips/mips_malta: Create IDE hard drive array dynamically, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 08/20] piix4: Add a MC146818 RTC Controller as specified in datasheet, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 11/20] hw/isa/piix4: Move piix4_create() to hw/isa/piix4.c, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 10/20] hw/mips/mips_malta: Extract the PIIX4 creation code as piix4_create(), Philippe Mathieu-Daudé, 2019/10/28
- [PULL 12/20] hw/i386: Remove obsolete LoadStateHandler::load_state_old handlers, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 13/20] hw/pci-host/piix: Extract piix3_create(), Philippe Mathieu-Daudé, 2019/10/28
- [PULL 14/20] hw/pci-host/piix: Move RCR_IOPORT register definition, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 15/20] hw/pci-host/piix: Define and use the PIIX IRQ Route Control Registers, Philippe Mathieu-Daudé, 2019/10/28
- [PULL 17/20] hw/pci-host/piix: Fix code style issues, Philippe Mathieu-Daudé, 2019/10/28