Message ID | 1506264466-28252-1-git-send-email-mark.cave-ayland@ilande.co.uk |
---|---|
Headers | show |
Series | mac_dbdma: tidy-up and QOMify | expand |
On Sun, Sep 24, 2017 at 03:47:39PM +0100, Mark Cave-Ayland wrote: > Whilst looking at implementing another DBDMA device for the Mac machines > I noticed a couple of things: firstly there were some unused fields still > in DBDMAState, and secondly the existing code still used global functions > to register DMA channels and handle the relationship between macio IDE and > DBDMA. > > This patchset removes the now-unused fields from DBDMA state, QOMifys the > DBDMA device, uses a QOM object link to allow the macio IDE object to > reference the DBDMA device, and then finally removes the global DBDMA_* > functions substituting them instead for QOM methods. > > Note: this patchset does not apply to master but on top of David's > ppc-for-2.11 branch since there are merge conflicts with my previous > patchset. Hopefully the Based-On line below is enough to keep patchew > happy, even though it wasn't the final version applied to the ppc-for-2.11 > branch. > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> > Based-on: 1505668548-16616-1-git-send-email-mark.cave-ayland@ilande.co.uk (ppc: more Mac-related fixups) I've applied 1-5/7. There are a couple of details I'm not 100% convinced on, but it's still better than what was there before. 6 & 7 I'm still thinking about.
Whilst looking at implementing another DBDMA device for the Mac machines I noticed a couple of things: firstly there were some unused fields still in DBDMAState, and secondly the existing code still used global functions to register DMA channels and handle the relationship between macio IDE and DBDMA. This patchset removes the now-unused fields from DBDMA state, QOMifys the DBDMA device, uses a QOM object link to allow the macio IDE object to reference the DBDMA device, and then finally removes the global DBDMA_* functions substituting them instead for QOM methods. Note: this patchset does not apply to master but on top of David's ppc-for-2.11 branch since there are merge conflicts with my previous patchset. Hopefully the Based-On line below is enough to keep patchew happy, even though it wasn't the final version applied to the ppc-for-2.11 branch. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Based-on: 1505668548-16616-1-git-send-email-mark.cave-ayland@ilande.co.uk (ppc: more Mac-related fixups) Mark Cave-Ayland (7): mac_dbdma: remove unused IO fields from DBDMAState mac_dbdma: QOMify mac_dbdma: remove DBDMA_init() function macio: pass channel into MACIOIDEState via qdev property macio: use object link between MACIO_IDE and MAC_DBDMA object mac_dbdma: change DBDMA_register_channel to a MAC_DBDMA type method mac_dbdma: change DBDMA_kick to a MAC_DBDMA type method hw/ide/macio.c | 26 ++++++++++----- hw/misc/macio/mac_dbdma.c | 79 +++++++++++++++++++++++++++++--------------- hw/misc/macio/macio.c | 20 ++++++++--- hw/ppc/mac.h | 4 +-- include/hw/ppc/mac_dbdma.h | 22 ++++++------ 5 files changed, 97 insertions(+), 54 deletions(-)