mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
esp: convert ESPState pdma_cb from a function pointer to an integer
This prepares for the inclusion of the current PDMA callback in the migration stream since the callback is referenced by an integer instead of a function pointer. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220305155530.9265-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
parent
d0243b094b
commit
77987ef5a3
2 changed files with 41 additions and 14 deletions
|
@ -51,7 +51,7 @@ struct ESPState {
|
|||
ESPDMAMemoryReadWriteFunc dma_memory_write;
|
||||
void *dma_opaque;
|
||||
void (*dma_cb)(ESPState *s);
|
||||
void (*pdma_cb)(ESPState *s);
|
||||
uint8_t pdma_cb;
|
||||
|
||||
uint8_t mig_version_id;
|
||||
|
||||
|
@ -150,6 +150,15 @@ struct SysBusESPState {
|
|||
#define TCHI_FAS100A 0x4
|
||||
#define TCHI_AM53C974 0x12
|
||||
|
||||
/* PDMA callbacks */
|
||||
enum pdma_cb {
|
||||
SATN_PDMA_CB = 0,
|
||||
S_WITHOUT_SATN_PDMA_CB = 1,
|
||||
SATN_STOP_PDMA_CB = 2,
|
||||
WRITE_RESPONSE_PDMA_CB = 3,
|
||||
DO_DMA_PDMA_CB = 4
|
||||
};
|
||||
|
||||
void esp_dma_enable(ESPState *s, int irq, int level);
|
||||
void esp_request_cancelled(SCSIRequest *req);
|
||||
void esp_command_complete(SCSIRequest *req, size_t resid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue