[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/20] sparc64: disable floppy DMA
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 15/20] sparc64: disable floppy DMA |
Date: |
Wed, 3 Feb 2016 15:32:30 -0500 |
From: Hervé Poussineau <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
hw/sparc64/sun4u.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d356717..371f5bc 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);
--
2.4.3
- [Qemu-devel] [PULL 12/20] i8257: implement the IsaDma interface, (continued)
- [Qemu-devel] [PULL 12/20] i8257: implement the IsaDma interface, John Snow, 2016/02/03
- [Qemu-devel] [PULL 06/20] i8257: rename functions to start with i8257_ prefix, John Snow, 2016/02/03
- [Qemu-devel] [PULL 09/20] i8257: QOM'ify, John Snow, 2016/02/03
- [Qemu-devel] [PULL 05/20] i8257: rename struct dma_regs to I8257Regs, John Snow, 2016/02/03
- [Qemu-devel] [PULL 13/20] magnum: disable floppy DMA for now, John Snow, 2016/02/03
- [Qemu-devel] [PULL 02/20] i82374: device only existed as ISA device, so simplify device, John Snow, 2016/02/03
- [Qemu-devel] [PULL 04/20] i8257: rename struct dma_cont to I8257State, John Snow, 2016/02/03
- [Qemu-devel] [PULL 07/20] i8257: make the DMA running method per controller, John Snow, 2016/02/03
- [Qemu-devel] [PULL 11/20] isa: add an ISA DMA interface, and store it within the ISA bus, John Snow, 2016/02/03
- [Qemu-devel] [PULL 14/20] sparc: disable floppy DMA, John Snow, 2016/02/03
- [Qemu-devel] [PULL 15/20] sparc64: disable floppy DMA,
John Snow <=
- [Qemu-devel] [PULL 16/20] fdc: use IsaDma interface instead of global DMA_* functions, John Snow, 2016/02/03
- [Qemu-devel] [PULL 17/20] cs4231a: use IsaDma interface instead of global DMA_* functions, John Snow, 2016/02/03
- [Qemu-devel] [PULL 18/20] gus: use IsaDma interface instead of global DMA_* functions, John Snow, 2016/02/03
- [Qemu-devel] [PULL 19/20] sb16: use IsaDma interface instead of global DMA_* functions, John Snow, 2016/02/03
- [Qemu-devel] [PULL 20/20] dma: remove now useless DMA_* functions, John Snow, 2016/02/03
- Re: [Qemu-devel] [PULL 00/20] FDC patches, Peter Maydell, 2016/02/04