piix4: Add an i8254 PIT Controller as specified in datasheet
Remove i8254 instanciated in malta board, to not have it twice. Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Message-Id: <20171216090228.28505-10-hpoussin@reactos.org> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
135bfcc1ef
commit
f9b3cd563d
|
@ -30,6 +30,7 @@
|
||||||
#include "hw/isa/isa.h"
|
#include "hw/isa/isa.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/dma/i8257.h"
|
#include "hw/dma/i8257.h"
|
||||||
|
#include "hw/timer/i8254.h"
|
||||||
#include "migration/vmstate.h"
|
#include "migration/vmstate.h"
|
||||||
#include "sysemu/reset.h"
|
#include "sysemu/reset.h"
|
||||||
#include "sysemu/runstate.h"
|
#include "sysemu/runstate.h"
|
||||||
|
@ -168,6 +169,9 @@ static void piix4_realize(PCIDevice *dev, Error **errp)
|
||||||
/* initialize ISA irqs */
|
/* initialize ISA irqs */
|
||||||
isa_bus_irqs(isa_bus, s->isa);
|
isa_bus_irqs(isa_bus, s->isa);
|
||||||
|
|
||||||
|
/* initialize pit */
|
||||||
|
i8254_pit_init(isa_bus, 0x40, 0, NULL);
|
||||||
|
|
||||||
/* DMA */
|
/* DMA */
|
||||||
i8257_dma_init(isa_bus, 0);
|
i8257_dma_init(isa_bus, 0);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
#include "hw/rtc/mc146818rtc.h"
|
#include "hw/rtc/mc146818rtc.h"
|
||||||
#include "hw/timer/i8254.h"
|
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
#include "hw/sysbus.h" /* SysBusDevice */
|
#include "hw/sysbus.h" /* SysBusDevice */
|
||||||
#include "qemu/host-utils.h"
|
#include "qemu/host-utils.h"
|
||||||
|
@ -99,8 +98,6 @@ typedef struct {
|
||||||
qemu_irq i8259[ISA_NUM_IRQS];
|
qemu_irq i8259[ISA_NUM_IRQS];
|
||||||
} MaltaState;
|
} MaltaState;
|
||||||
|
|
||||||
static ISADevice *pit;
|
|
||||||
|
|
||||||
static struct _loaderparams {
|
static struct _loaderparams {
|
||||||
int ram_size, ram_low_size;
|
int ram_size, ram_low_size;
|
||||||
const char *kernel_filename;
|
const char *kernel_filename;
|
||||||
|
@ -1428,7 +1425,6 @@ void mips_malta_init(MachineState *machine)
|
||||||
pci_create_simple(pci_bus, piix4_devfn + 2, "piix4-usb-uhci");
|
pci_create_simple(pci_bus, piix4_devfn + 2, "piix4-usb-uhci");
|
||||||
smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100,
|
smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100,
|
||||||
isa_get_irq(NULL, 9), NULL, 0, NULL);
|
isa_get_irq(NULL, 9), NULL, 0, NULL);
|
||||||
pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
|
|
||||||
mc146818_rtc_init(isa_bus, 2000, NULL);
|
mc146818_rtc_init(isa_bus, 2000, NULL);
|
||||||
|
|
||||||
/* generate SPD EEPROM data */
|
/* generate SPD EEPROM data */
|
||||||
|
|
Loading…
Reference in a new issue