| 1 | #ifndef HW_IDE_DMA_H |
| 2 | #define HW_IDE_DMA_H |
| 3 | |
| 4 | #include "qemu/aiocb.h" |
| 5 | #include "qemu/iov.h" |
| 6 | |
| 7 | typedef struct IDEState IDEState; |
| 8 | typedef struct IDEDMAOps IDEDMAOps; |
| 9 | typedef struct IDEDMA IDEDMA; |
| 10 | |
| 11 | typedef void DMAStartFunc(const IDEDMA *, IDEState *, BlockCompletionFunc *); |
| 12 | typedef void DMAVoidFunc(const IDEDMA *); |
| 13 | typedef bool DMABoolFunc(const IDEDMA *); |
| 14 | typedef int DMAIntFunc(const IDEDMA *, bool); |
| 15 | typedef int32_t DMAInt32Func(const IDEDMA *, int32_t len); |
| 16 | typedef void DMAu32Func(const IDEDMA *, uint32_t); |
| 17 | typedef void DMAStopFunc(const IDEDMA *, bool); |
| 18 | |
| 19 | struct IDEDMAOps { |
| 20 | DMAStartFunc *start_dma; |
| 21 | DMABoolFunc *pio_transfer; |
| 22 | DMAInt32Func *prepare_buf; |
| 23 | DMAu32Func *commit_buf; |
| 24 | DMAIntFunc *rw_buf; |
| 25 | DMAVoidFunc *restart; |
| 26 | DMAVoidFunc *restart_dma; |
| 27 | DMAStopFunc *set_inactive; |
| 28 | DMAVoidFunc *cmd_done; |
| 29 | DMAVoidFunc *reset; |
| 30 | }; |
| 31 | |
| 32 | struct IDEDMA { |
| 33 | const IDEDMAOps *ops; |
| 34 | QEMUIOVector qiov; |
| 35 | BlockAIOCB *aiocb; |
| 36 | }; |
| 37 | |
| 38 | #endif |