summaryrefslogtreecommitdiffstats
path: root/hw/sparc64/sun4u.c
diff options
context:
space:
mode:
authorHervé Poussineau2016-02-03 17:28:57 +0100
committerJohn Snow2016-02-03 17:28:57 +0100
commitc3ae40e12cd7a41d2620ca2b771f6e167c0632d6 (patch)
tree4f028ec31af4176b397587d2771bcdb02ed65b8e /hw/sparc64/sun4u.c
parentsparc: disable floppy DMA (diff)
downloadqemu-c3ae40e12cd7a41d2620ca2b771f6e167c0632d6.tar.gz
qemu-c3ae40e12cd7a41d2620ca2b771f6e167c0632d6.tar.xz
qemu-c3ae40e12cd7a41d2620ca2b771f6e167c0632d6.zip
sparc64: disable floppy DMA
All functions relative to DMA (DMA_*() functions) are stubs on sparc64 platform. Disable the DMA of the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Message-id: 1453843944-26833-15-git-send-email-hpoussin@reactos.org Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/sparc64/sun4u.c')
-rw-r--r--hw/sparc64/sun4u.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d356717c08..371f5bcbf9 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -816,6 +816,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
qemu_irq *ivec_irqs, *pbm_irqs;
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
DriveInfo *fd[MAX_FD];
+ DeviceState *dev;
FWCfgState *fw_cfg;
/* init CPUs */
@@ -852,10 +853,22 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
pci_cmd646_ide_init(pci_bus, hd, 1);
isa_create_simple(isa_bus, "i8042");
+
+ /* Floppy */
for(i = 0; i < MAX_FD; i++) {
fd[i] = drive_get(IF_FLOPPY, 0, i);
}
- fdctrl_init_isa(isa_bus, fd);
+ dev = DEVICE(isa_create(isa_bus, TYPE_ISA_FDC));
+ if (fd[0]) {
+ qdev_prop_set_drive(dev, "driveA", blk_by_legacy_dinfo(fd[0]),
+ &error_abort);
+ }
+ if (fd[1]) {
+ qdev_prop_set_drive(dev, "driveB", blk_by_legacy_dinfo(fd[1]),
+ &error_abort);
+ }
+ qdev_prop_set_uint32(dev, "dma", -1);
+ qdev_init_nofail(dev);
/* Map NVRAM into I/O (ebus) space */
nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);