static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)

{

	target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN);



	/* Load and decode. FIXME: handle endianness.  */

	cpu_physical_memory_read (addr, 

				  (void *) &ctrl->channels[c].current_c, 

				  sizeof ctrl->channels[c].current_c);



	D(dump_c(c, &ctrl->channels[c].current_c));

	/* I guess this should update the current pos.  */

	ctrl->channels[c].regs[RW_SAVED_DATA] =

		(uint32_t)(unsigned long)ctrl->channels[c].current_c.saved_data;

	ctrl->channels[c].regs[RW_SAVED_DATA_BUF] =

		(uint32_t)(unsigned long)ctrl->channels[c].current_c.saved_data_buf;

}

static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)

{

	target_phys_addr_t addr = channel_reg(ctrl, c, RW_GROUP_DOWN);



	

	cpu_physical_memory_read (addr, 

				  (void *) &ctrl->channels[c].current_c, 

				  sizeof ctrl->channels[c].current_c);



	D(dump_c(c, &ctrl->channels[c].current_c));

	

	ctrl->channels[c].regs[RW_SAVED_DATA] =

		(uint32_t)(unsigned long)ctrl->channels[c].current_c.saved_data;

	ctrl->channels[c].regs[RW_SAVED_DATA_BUF] =

		(uint32_t)(unsigned long)ctrl->channels[c].current_c.saved_data_buf;

}

static void FUNC_0(struct fs_dma_ctrl *VAR_0, int VAR_1)

{

	target_phys_addr_t addr = channel_reg(VAR_0, VAR_1, RW_GROUP_DOWN);



	

	cpu_physical_memory_read (addr, 

				  (void *) &VAR_0->channels[VAR_1].current_c, 

				  sizeof VAR_0->channels[VAR_1].current_c);



	D(dump_c(VAR_1, &VAR_0->channels[VAR_1].current_c));

	

	VAR_0->channels[VAR_1].regs[RW_SAVED_DATA] =

		(uint32_t)(unsigned long)VAR_0->channels[VAR_1].current_c.saved_data;

	VAR_0->channels[VAR_1].regs[RW_SAVED_DATA_BUF] =

		(uint32_t)(unsigned long)VAR_0->channels[VAR_1].current_c.saved_data_buf;

}

static void FUNC_0(struct fs_dma_ctrl *VAR_0, int VAR_1)
{ target_phys_addr_t addr = channel_reg(VAR_0, VAR_1, RW_GROUP_DOWN); cpu_physical_memory_read (addr,
(void *) &VAR_0->channels[VAR_1].current_c,
sizeof VAR_0->channels[VAR_1].current_c); D(dump_c(VAR_1, &VAR_0->channels[VAR_1].current_c)); VAR_0->channels[VAR_1].regs[RW_SAVED_DATA] =
(uint32_t)(unsigned long)VAR_0->channels[VAR_1].current_c.saved_data; VAR_0->channels[VAR_1].regs[RW_SAVED_DATA_BUF] =
(uint32_t)(unsigned long)VAR_0->channels[VAR_1].current_c.saved_data_buf; }