mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
dma/rc4030: use AddressSpace and address_space_rw in users
Now that rc4030 internally uses an AddressSpace for DMA handling, make its root memory region public. This is especially usefull for dp8393x netcard, which now uses well known QEMU types and methods. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
This commit is contained in:
parent
a3d586f704
commit
dd8205130b
4 changed files with 42 additions and 50 deletions
|
@ -137,7 +137,7 @@ static void mips_jazz_init(MachineState *machine,
|
|||
CPUMIPSState *env;
|
||||
qemu_irq *rc4030, *i8259;
|
||||
rc4030_dma *dmas;
|
||||
void* rc4030_opaque;
|
||||
MemoryRegion *rc4030_dma_mr;
|
||||
MemoryRegion *isa_mem = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *isa_io = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *rtc = g_new(MemoryRegion, 1);
|
||||
|
@ -213,7 +213,7 @@ static void mips_jazz_init(MachineState *machine,
|
|||
cpu_mips_clock_init(env);
|
||||
|
||||
/* Chipset */
|
||||
rc4030_opaque = rc4030_init(env->irq[6], env->irq[3], &rc4030, &dmas,
|
||||
rc4030_dma_mr = rc4030_init(env->irq[6], env->irq[3], &rc4030, &dmas,
|
||||
address_space);
|
||||
memory_region_init_io(dma_dummy, NULL, &dma_dummy_ops, NULL, "dummy_dma", 0x1000);
|
||||
memory_region_add_subregion(address_space, 0x8000d000, dma_dummy);
|
||||
|
@ -268,7 +268,7 @@ static void mips_jazz_init(MachineState *machine,
|
|||
nd->model = g_strdup("dp83932");
|
||||
if (strcmp(nd->model, "dp83932") == 0) {
|
||||
dp83932_init(nd, 0x80001000, 2, get_system_memory(), rc4030[4],
|
||||
rc4030_opaque, rc4030_dma_memory_rw);
|
||||
rc4030_dma_mr);
|
||||
break;
|
||||
} else if (is_help_option(nd->model)) {
|
||||
fprintf(stderr, "qemu: Supported NICs: dp83932\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue