mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-27 01:48:37 -07:00
hw/net/allwinner-sun8i-emac: Use AddressSpace for DMA transfers
Allow the device to execute the DMA transfers in a different AddressSpace. The H3 SoC keeps using the system_memory address space, but via the proper dma_memory_access() API. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Message-id: 20200814122907.27732-1-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b3aec952bf
commit
4757cb8579
3 changed files with 38 additions and 16 deletions
|
|
@ -49,6 +49,12 @@ typedef struct AwSun8iEmacState {
|
|||
/** Interrupt output signal to notify CPU */
|
||||
qemu_irq irq;
|
||||
|
||||
/** Memory region where DMA transfers are done */
|
||||
MemoryRegion *dma_mr;
|
||||
|
||||
/** Address space used internally for DMA transfers */
|
||||
AddressSpace dma_as;
|
||||
|
||||
/** Generic Network Interface Controller (NIC) for networking API */
|
||||
NICState *nic;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue