From: Hervé Poussineau <hpoussin@reactos.org>
Remove i8254 instanciated in malta board, to not have it twice.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
[PMD: rebased]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/isa/piix4.c | 4 ++++
hw/mips/mips_malta.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 56a1c7d429..04b13f97c6 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -31,6 +31,7 @@
#include "hw/southbridge/i82371_piix.h"
#include "hw/dma/i8257.h"
#include "hw/sysbus.h"
+#include "hw/timer/i8254.h"
PCIDevice *piix4_dev;
@@ -164,6 +165,9 @@ static void piix4_realize(PCIDevice *pci_dev, Error **errp)
/* initialize ISA irqs */
isa_bus_irqs(isa_bus, s->isa);
+ /* initialize pit */
+ i8254_pit_init(isa_bus, 0x40, 0, NULL);
+
/* DMA */
i8257_dma_init(isa_bus, 0);
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index db5a8b1811..84b4d5c423 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -44,7 +44,6 @@
#include "hw/loader.h"
#include "elf.h"
#include "hw/timer/mc146818rtc.h"
-#include "hw/timer/i8254.h"
#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "hw/sysbus.h" /* SysBusDevice */
@@ -98,8 +97,6 @@ typedef struct {
qemu_irq i8259[16];
} MaltaState;
-static ISADevice *pit;
-
static struct _loaderparams {
int ram_size, ram_low_size;
const char *kernel_filename;
@@ -1206,7 +1203,6 @@ void mips_malta_init(MachineState *machine)
pci_create_simple(pci_bus, piix4_devfn + 2, "piix4-usb-uhci");
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);
mc146818_rtc_init(isa_bus, 2000, NULL);
/* generate SPD EEPROM data */
--
2.15.1