[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 38/60] hw/mips/jazz: create ESP device directly via q
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 38/60] hw/mips/jazz: create ESP device directly via qdev |
Date: |
Thu, 28 Jun 2018 22:04:48 +0200 |
From: Mark Cave-Ayland <address@hidden>
MIPS jazz is the last user of the legacy esp_init() function so move creation
of the ESP device over to use qdev.
Note that the esp_reset and dma_enable qemu_irqs are currently unused and so
we do not wire these up and instead remove the variables to prevent the
compiler emitting unused variable warnings.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Tested-by: Hervé Poussineau <address@hidden>
---
hw/mips/mips_jazz.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 90cb306..1afbe3c 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -145,10 +145,10 @@ static void mips_jazz_init(MachineState *machine,
ISABus *isa_bus;
ISADevice *pit;
DriveInfo *fds[MAX_FD];
- qemu_irq esp_reset, dma_enable;
MemoryRegion *ram = g_new(MemoryRegion, 1);
MemoryRegion *bios = g_new(MemoryRegion, 1);
MemoryRegion *bios2 = g_new(MemoryRegion, 1);
+ SysBusESPState *sysbus_esp;
ESPState *esp;
/* init CPUs */
@@ -281,8 +281,21 @@ static void mips_jazz_init(MachineState *machine,
}
/* SCSI adapter */
- esp = esp_init(0x80002000, 0, rc4030_dma_read, rc4030_dma_write, dmas[0],
- qdev_get_gpio_in(rc4030, 5), &esp_reset, &dma_enable);
+ dev = qdev_create(NULL, TYPE_ESP);
+ sysbus_esp = ESP_STATE(dev);
+ esp = &sysbus_esp->esp;
+ esp->dma_memory_read = rc4030_dma_read;
+ esp->dma_memory_write = rc4030_dma_write;
+ esp->dma_opaque = dmas[0];
+ sysbus_esp->it_shift = 0;
+ /* XXX for now until rc4030 has been changed to use DMA enable signal */
+ esp->dma_enabled = 1;
+ qdev_init_nofail(dev);
+
+ sysbus = SYS_BUS_DEVICE(dev);
+ sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 5));
+ sysbus_mmio_map(sysbus, 0, 0x80002000);
+
scsi_bus_legacy_handle_cmdline(&esp->bus);
/* Floppy */
--
1.8.3.1
- Re: [Qemu-devel] [PULL 29/60] numa: report all DIMM/NVDIMMs as plugged memory, (continued)
- [Qemu-devel] [PULL 31/60] Deprecate the -enable-hax option, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 30/60] osdep: work around Coverity parsing errors, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 32/60] pr-helper: fix --socket-path default in help, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 33/60] pr-helper: fix assertion failure on failed multipath PERSISTENT RESERVE IN, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 34/60] pr-manager-helper: avoid SIGSEGV when writing to the socket fail, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 35/60] pr-manager: put stubs in .c file, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 40/60] WHPX workaround bug in OSVW handling, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 36/60] pr-manager: add query-pr-managers QMP command, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 39/60] esp: remove legacy esp_init() function, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 38/60] hw/mips/jazz: create ESP device directly via qdev,
Paolo Bonzini <=
- [Qemu-devel] [PULL 37/60] pr-manager-helper: report event on connection/disconnection, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 41/60] WHPX: register for unrecognized MSR exits, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 43/60] target-i386: Add NMI interception to SVM, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 42/60] memory/hmp: Print owners/parents in "info mtree", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 48/60] ioapic: some proper indents when dump info, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 46/60] doc: another fix to "info pic", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 44/60] target-i386: Allow interrupt injection after STGI, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 45/60] target-i386: Mark cpu_vmexit noreturn, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 47/60] ioapic: support "info pic", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 49/60] ioapic: support "info irq", Paolo Bonzini, 2018/06/28