mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
q800: move ESP device to Q800MachineState
Also change the instantiation of the ESP device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20230621085353.113233-19-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
1a7a3f004c
commit
e78d17ca7d
2 changed files with 7 additions and 4 deletions
|
@ -376,8 +376,9 @@ static void q800_machine_init(MachineState *machine)
|
|||
|
||||
/* SCSI */
|
||||
|
||||
dev = qdev_new(TYPE_SYSBUS_ESP);
|
||||
sysbus_esp = SYSBUS_ESP(dev);
|
||||
object_initialize_child(OBJECT(machine), "esp", &m->esp,
|
||||
TYPE_SYSBUS_ESP);
|
||||
sysbus_esp = SYSBUS_ESP(&m->esp);
|
||||
esp = &sysbus_esp->esp;
|
||||
esp->dma_memory_read = NULL;
|
||||
esp->dma_memory_write = NULL;
|
||||
|
@ -385,8 +386,8 @@ static void q800_machine_init(MachineState *machine)
|
|||
sysbus_esp->it_shift = 4;
|
||||
esp->dma_enabled = 1;
|
||||
|
||||
sysbus = SYS_BUS_DEVICE(dev);
|
||||
sysbus_realize_and_unref(sysbus, &error_fatal);
|
||||
sysbus = SYS_BUS_DEVICE(&m->esp);
|
||||
sysbus_realize(sysbus, &error_fatal);
|
||||
/* SCSI and SCSI data IRQs are negative edge triggered */
|
||||
sysbus_connect_irq(sysbus, 0,
|
||||
qemu_irq_invert(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue