/* Note that the source address is modified during the DMA transfer according to edma3_set_src_index().  */
void edma3_set_src(u32 base, int slot, u32 src, enum edma3_address_mode mode, enum edma3_fifo_width width)
/* Note that the source address is modified during the DMA transfer according to edma3_set_src_index().  */
void edma3_set_src(u32 base, int slot, u32 src, enum edma3_address_mode mode, enum edma3_fifo_width width)
{
	u32 opt;
	struct edma3_slot_layout *rg;
	rg = (struct edma3_slot_layout *)(base + EDMA3_SL_BASE(slot));
	opt = __raw_readl(&rg->opt);
	if (mode == FIFO)
		opt = (opt & EDMA3_SLOPT_FIFO_WIDTH_MASK) |
		       (EDMA3_SLOPT_DST_ADDR_CONST_MODE |
			EDMA3_SLOPT_FIFO_WIDTH_SET(width));
	else
		opt &= ~EDMA3_SLOPT_DST_ADDR_CONST_MODE;
	__raw_writel(opt, &rg->opt);
	__raw_writel(src, &rg->src);
}