void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels)

{

	struct fs_dma_ctrl *ctrl = NULL;



	ctrl = g_malloc0(sizeof *ctrl);



        ctrl->bh = qemu_bh_new(DMA_run, ctrl);



	ctrl->nr_channels = nr_channels;

	ctrl->channels = g_malloc0(sizeof ctrl->channels[0] * nr_channels);



	memory_region_init_io(&ctrl->mmio, &dma_ops, ctrl, "etraxfs-dma",

			      nr_channels * 0x2000);

	memory_region_add_subregion(get_system_memory(), base, &ctrl->mmio);



	return ctrl;

}

void *etraxfs_dmac_init(target_phys_addr_t base, int nr_channels)

{

	struct fs_dma_ctrl *ctrl = NULL;



	ctrl = g_malloc0(sizeof *ctrl);



        ctrl->bh = qemu_bh_new(DMA_run, ctrl);



	ctrl->nr_channels = nr_channels;

	ctrl->channels = g_malloc0(sizeof ctrl->channels[0] * nr_channels);



	memory_region_init_io(&ctrl->mmio, &dma_ops, ctrl, "etraxfs-dma",

			      nr_channels * 0x2000);

	memory_region_add_subregion(get_system_memory(), base, &ctrl->mmio);



	return ctrl;

}

void *FUNC_0(target_phys_addr_t VAR_0, int VAR_1)

{

	struct fs_dma_ctrl *VAR_2 = NULL;



	VAR_2 = g_malloc0(sizeof *VAR_2);



        VAR_2->bh = qemu_bh_new(DMA_run, VAR_2);



	VAR_2->VAR_1 = VAR_1;

	VAR_2->channels = g_malloc0(sizeof VAR_2->channels[0] * VAR_1);



	memory_region_init_io(&VAR_2->mmio, &dma_ops, VAR_2, "etraxfs-dma",

			      VAR_1 * 0x2000);

	memory_region_add_subregion(get_system_memory(), VAR_0, &VAR_2->mmio);



	return VAR_2;

}

void *FUNC_0(target_phys_addr_t VAR_0, int VAR_1)
{ struct fs_dma_ctrl *VAR_2 = NULL; VAR_2 = g_malloc0(sizeof *VAR_2); VAR_2->bh = qemu_bh_new(DMA_run, VAR_2); VAR_2->VAR_1 = VAR_1; VAR_2->channels = g_malloc0(sizeof VAR_2->channels[0] * VAR_1); memory_region_init_io(&VAR_2->mmio, &dma_ops, VAR_2, "etraxfs-dma",
VAR_1 * 0x2000); memory_region_add_subregion(get_system_memory(), VAR_0, &VAR_2->mmio); return VAR_2; }