Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / ide / ide-dma.h
blobd0b19ac9c57454e553047713beae36f16b6c7bf8
1 #ifndef HW_IDE_DMA_H
2 #define HW_IDE_DMA_H
4 #include "block/aio.h"
5 #include "qemu/iov.h"
7 typedef struct IDEState IDEState;
8 typedef struct IDEDMAOps IDEDMAOps;
9 typedef struct IDEDMA IDEDMA;
11 typedef void DMAStartFunc(const IDEDMA *, IDEState *, BlockCompletionFunc *);
12 typedef void DMAVoidFunc(const IDEDMA *);
13 typedef int DMAIntFunc(const IDEDMA *, bool);
14 typedef int32_t DMAInt32Func(const IDEDMA *, int32_t len);
15 typedef void DMAu32Func(const IDEDMA *, uint32_t);
16 typedef void DMAStopFunc(const IDEDMA *, bool);
18 struct IDEDMAOps {
19 DMAStartFunc *start_dma;
20 DMAVoidFunc *pio_transfer;
21 DMAInt32Func *prepare_buf;
22 DMAu32Func *commit_buf;
23 DMAIntFunc *rw_buf;
24 DMAVoidFunc *restart;
25 DMAVoidFunc *restart_dma;
26 DMAStopFunc *set_inactive;
27 DMAVoidFunc *cmd_done;
28 DMAVoidFunc *reset;
31 struct IDEDMA {
32 const IDEDMAOps *ops;
33 QEMUIOVector qiov;
34 BlockAIOCB *aiocb;
37 #endif