This series follows on from a comment I made on Bernhard's PCI IDE tidy-up series [1] that it should be possible to further consolidate the BMDMA registers into the PCI IDE device with some minor rework to the CMD646 device.
It does this by moving the CMD646 device-specific BMDMA registers to a separate memory region, and then aliasing the device-specific BMDMA registers from the existing BMDMAState memory region. With this in place it should be fairly trivial to extend the consolidation implementation in [1]. Before "info mtree" output: 0000000000008200-000000000000820f (prio 1, i/o): cmd646-bmdma 0000000000008200-0000000000008203 (prio 0, i/o): cmd646-bmdma-bus 0000000000008204-0000000000008207 (prio 0, i/o): cmd646-bmdma-ioport 0000000000008208-000000000000820b (prio 0, i/o): cmd646-bmdma-bus 000000000000820c-000000000000820f (prio 0, i/o): cmd646-bmdma-ioport After "info mtree" output: 0000000000008200-000000000000820f (prio 1, i/o): cmd646-bmdma 0000000000008200-0000000000008203 (prio 0, i/o): cmd646-bmdma-bus 0000000000008201-0000000000008201 (prio 0, i/o): alias cmd646-bmdma[1] @cmd646-bmdma 0000000000000001-0000000000000001 0000000000008203-0000000000008203 (prio 0, i/o): alias cmd646-bmdma[3] @cmd646-bmdma 0000000000000003-0000000000000003 0000000000008204-0000000000008207 (prio 0, i/o): cmd646-bmdma-ioport 0000000000008208-000000000000820b (prio 0, i/o): cmd646-bmdma-bus 0000000000008209-0000000000008209 (prio 0, i/o): alias cmd646-bmdma[1] @cmd646-bmdma 0000000000000001-0000000000000001 000000000000820b-000000000000820b (prio 0, i/o): alias cmd646-bmdma[3] @cmd646-bmdma 0000000000000003-0000000000000003 000000000000820c-000000000000820f (prio 0, i/o): cmd646-bmdma-ioport The series was tested by confirming that breakpoints on the CMD646-specific BMDMA registers were being hit and that my test Debian install ISO still boots under qemu-system-sparc64. Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> [1] https://patchew.org/QEMU/20230422150728.176512-1-shen...@gmail.com/ Mark Cave-Ayland (5): cmd646: checkpatch fixes cmd646: create separate header and QOM type for CMD646_IDE cmd646: use TYPE_CMD646_IDE instead of hardcoded "cmd646-ide" string cmd646: rename cmd646_bmdma_ops to bmdma_ops cmd646: move device-specific BMDMA registers to separate memory region hw/alpha/dp264.c | 4 +- hw/ide/cmd646.c | 122 ++++++++++++++++++++++++++++++---------- hw/sparc64/sun4u.c | 4 +- include/hw/ide/cmd646.h | 42 ++++++++++++++ 4 files changed, 139 insertions(+), 33 deletions(-) create mode 100644 include/hw/ide/cmd646.h -- 2.30.2