[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/34] next-cube: map ESCC registers as a subregion of the nex
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 10/34] next-cube: map ESCC registers as a subregion of the next.scr memory region |
Date: |
Thu, 12 Dec 2024 11:45:56 +0000 |
Since the ESCC device exists within the memory range of the next.scr memory
region, map
the ESCC device registers as a subregion of the next.scr memory region instead
of
directly to the system address space.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
---
hw/m68k/next-cube.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index d08026ccf9..efbb11e74b 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -980,6 +980,7 @@ static const MemoryRegionOps next_floppy_ops = {
static void next_escc_init(DeviceState *pcdev)
{
+ NeXTPC *next_pc = NEXT_PC(pcdev);
DeviceState *dev;
SysBusDevice *s;
@@ -997,7 +998,9 @@ static void next_escc_init(DeviceState *pcdev)
sysbus_realize_and_unref(s, &error_fatal);
sysbus_connect_irq(s, 0, qdev_get_gpio_in(pcdev, NEXT_SCC_I));
sysbus_connect_irq(s, 1, qdev_get_gpio_in(pcdev, NEXT_SCC_DMA_I));
- sysbus_mmio_map(s, 0, 0x2118000);
+
+ memory_region_add_subregion(&next_pc->scrmem, 0x18000,
+ sysbus_mmio_get_region(s, 0));
}
static void next_pc_reset(DeviceState *dev)
--
2.39.5
- [PATCH v2 05/34] next-cube: introduce next_pc_init() object init function, (continued)
- [PATCH v2 05/34] next-cube: introduce next_pc_init() object init function, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 07/34] next-cube: move SCSI CSRs from next-pc to the next-scsi device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 09/34] next-cube: move floppy disk MMIO to separate memory region in next-pc, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 08/34] next-cube: move SCSI 4020/4021 logic from next-pc device to next-scsi device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 06/34] next-cube: introduce next-scsi device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 12/34] next-cube: move timer MMIO to separate memory region on next-pc device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 10/34] next-cube: map ESCC registers as a subregion of the next.scr memory region,
Mark Cave-Ayland <=
- [PATCH v2 11/34] next-cube: move ESCC to be QOM child of next-pc device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 13/34] next-cube: move en ethernet MMIO to separate memory region on next-pc device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 15/34] next-cube: remove unused next.scr memory region, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 14/34] next-cube: add empty slots for unknown accesses to next.scr memory region, Mark Cave-Ayland, 2024/12/12