Skip to content

Commit

Permalink
piix4: Add an i8257 DMA Controller as specified in datasheet
Browse files Browse the repository at this point in the history
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 <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Message-Id: <20171216090228.28505-9-hpoussin@reactos.org>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Esteban Bosse <estebanbosse@gmail.com>
[PMD: rebased, reworded description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
  • Loading branch information
hpoussin authored and philmd committed Nov 5, 2019
1 parent 9b74b19 commit 135bfcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hw/isa/piix4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions hw/mips/mips_malta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 135bfcc

Please sign in to comment.