static void dma_init2(struct dma_cont *d, int base, int dshift,

                      int page_base, int pageh_base,

                      qemu_irq *cpu_request_exit)

{

    int i;



    d->dshift = dshift;

    d->cpu_request_exit = cpu_request_exit;



    memory_region_init_io(&d->channel_io, NULL, &channel_io_ops, d,

                          "dma-chan", 8 << d->dshift);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                base, &d->channel_io);



    isa_register_portio_list(NULL, page_base, page_portio_list, d,

                             "dma-page");

    if (pageh_base >= 0) {

        isa_register_portio_list(NULL, pageh_base, pageh_portio_list, d,

                                 "dma-pageh");

    }



    memory_region_init_io(&d->cont_io, NULL, &cont_io_ops, d, "dma-cont",

                          8 << d->dshift);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                base + (8 << d->dshift), &d->cont_io);



    qemu_register_reset(dma_reset, d);

    dma_reset(d);

    for (i = 0; i < ARRAY_SIZE (d->regs); ++i) {

        d->regs[i].transfer_handler = dma_phony_handler;

    }

}

static void dma_init2(struct dma_cont *d, int base, int dshift,

                      int page_base, int pageh_base,

                      qemu_irq *cpu_request_exit)

{

    int i;



    d->dshift = dshift;

    d->cpu_request_exit = cpu_request_exit;



    memory_region_init_io(&d->channel_io, NULL, &channel_io_ops, d,

                          "dma-chan", 8 << d->dshift);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                base, &d->channel_io);



    isa_register_portio_list(NULL, page_base, page_portio_list, d,

                             "dma-page");

    if (pageh_base >= 0) {

        isa_register_portio_list(NULL, pageh_base, pageh_portio_list, d,

                                 "dma-pageh");

    }



    memory_region_init_io(&d->cont_io, NULL, &cont_io_ops, d, "dma-cont",

                          8 << d->dshift);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                base + (8 << d->dshift), &d->cont_io);



    qemu_register_reset(dma_reset, d);

    dma_reset(d);

    for (i = 0; i < ARRAY_SIZE (d->regs); ++i) {

        d->regs[i].transfer_handler = dma_phony_handler;

    }

}

static void FUNC_0(struct dma_cont *VAR_0, int VAR_1, int VAR_2,

                      int VAR_3, int VAR_4,

                      qemu_irq *VAR_5)

{

    int VAR_6;



    VAR_0->VAR_2 = VAR_2;

    VAR_0->VAR_5 = VAR_5;



    memory_region_init_io(&VAR_0->channel_io, NULL, &channel_io_ops, VAR_0,

                          "dma-chan", 8 << VAR_0->VAR_2);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                VAR_1, &VAR_0->channel_io);



    isa_register_portio_list(NULL, VAR_3, page_portio_list, VAR_0,

                             "dma-page");

    if (VAR_4 >= 0) {

        isa_register_portio_list(NULL, VAR_4, pageh_portio_list, VAR_0,

                                 "dma-pageh");

    }



    memory_region_init_io(&VAR_0->cont_io, NULL, &cont_io_ops, VAR_0, "dma-cont",

                          8 << VAR_0->VAR_2);

    memory_region_add_subregion(isa_address_space_io(NULL),

                                VAR_1 + (8 << VAR_0->VAR_2), &VAR_0->cont_io);



    qemu_register_reset(dma_reset, VAR_0);

    dma_reset(VAR_0);

    for (VAR_6 = 0; VAR_6 < ARRAY_SIZE (VAR_0->regs); ++VAR_6) {

        VAR_0->regs[VAR_6].transfer_handler = dma_phony_handler;

    }

}

static void FUNC_0(struct dma_cont *VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4,
qemu_irq *VAR_5)
{ int VAR_6; VAR_0->VAR_2 = VAR_2; VAR_0->VAR_5 = VAR_5; memory_region_init_io(&VAR_0->channel_io, NULL, &channel_io_ops, VAR_0,
"dma-chan", 8 << VAR_0->VAR_2); memory_region_add_subregion(isa_address_space_io(NULL),
VAR_1, &VAR_0->channel_io); isa_register_portio_list(NULL, VAR_3, page_portio_list, VAR_0,
"dma-page"); if (VAR_4 >= 0) { isa_register_portio_list(NULL, VAR_4, pageh_portio_list, VAR_0,
"dma-pageh"); } memory_region_init_io(&VAR_0->cont_io, NULL, &cont_io_ops, VAR_0, "dma-cont",
8 << VAR_0->VAR_2); memory_region_add_subregion(isa_address_space_io(NULL),
VAR_1 + (8 << VAR_0->VAR_2), &VAR_0->cont_io); qemu_register_reset(dma_reset, VAR_0); dma_reset(VAR_0); for (VAR_6 = 0; VAR_6 < ARRAY_SIZE (VAR_0->regs); ++VAR_6) { VAR_0->regs[VAR_6].transfer_handler = dma_phony_handler; } }