[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/33] next-cube: create new next.scsi container memory region
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v3 03/33] next-cube: create new next.scsi container memory region |
Date: |
Sun, 22 Dec 2024 12:59:42 +0000 |
Move the ESP SCSI and SCSI CSR registers to the new next.scsi container memory
region.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/m68k/next-cube.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index f918998182..58b4762ecd 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -94,6 +94,7 @@ struct NeXTPC {
MemoryRegion mmiomem;
MemoryRegion scrmem;
+ MemoryRegion scsimem;
uint32_t scr1;
uint32_t scr2;
@@ -843,7 +844,12 @@ static void next_scsi_init(DeviceState *pcdev)
sysbusdev = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(sysbusdev, &error_fatal);
sysbus_connect_irq(sysbusdev, 0, qdev_get_gpio_in(pcdev, NEXT_SCSI_I));
- sysbus_mmio_map(sysbusdev, 0, 0x2114000);
+
+ memory_region_init(&next_pc->scsimem, OBJECT(next_pc), "next.scsi", 0x40);
+ memory_region_add_subregion(&next_pc->scsimem, 0x0,
+ sysbus_mmio_get_region(sysbusdev, 0));
+
+ memory_region_add_subregion(&next_pc->scrmem, 0x14000, &next_pc->scsimem);
next_pc->scsi_reset = qdev_get_gpio_in(dev, 0);
next_pc->scsi_dma = qdev_get_gpio_in(dev, 1);
--
2.39.5
- [PATCH v3 00/33] next-cube: more tidy-ups and improvements, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 02/33] next-cube: remove overlap between next.dma and next.mmio memory regions, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 01/33] next-cube: remove 0x14020 dummy value from next_mmio_read(), Mark Cave-Ayland, 2024/12/22
- [PATCH v3 03/33] next-cube: create new next.scsi container memory region,
Mark Cave-Ayland <=
- [PATCH v3 04/33] next-cube: move next_scsi_init() to next_pc_realize(), Mark Cave-Ayland, 2024/12/22
- [PATCH v3 14/33] next-cube: add empty slots for unknown accesses to next.scr memory region, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 06/33] next-cube: introduce next-scsi device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 11/33] next-cube: move ESCC to be QOM child of next-pc device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 13/33] next-cube: move en ethernet MMIO to separate memory region on next-pc device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 05/33] next-cube: introduce next_pc_init() object init function, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 08/33] next-cube: move SCSI 4020/4021 logic from next-pc device to next-scsi device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 12/33] next-cube: move timer MMIO to separate memory region on next-pc device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 15/33] next-cube: remove unused next.scr memory region, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 17/33] next-cube: convert next-pc device to use Resettable interface, Mark Cave-Ayland, 2024/12/22