/* qedma3_start - start qdma on a channel @base: base address of edma @cfg: pinter to struct edma3_channel_config where you can set the slot number to associate with, the chnum, which corresponds your quick channel number 0-7, complete code - transfer complete code and trigger slot word - which has to correspond to the word number in edma3_slot_layout struct for generating event.  */
void qedma3_start(u32 base, struct edma3_channel_config *cfg)
/* qedma3_start - start qdma on a channel @base: base address of edma @cfg: pinter to struct edma3_channel_config where you can set the slot number to associate with, the chnum, which corresponds your quick channel number 0-7, complete code - transfer complete code and trigger slot word - which has to correspond to the word number in edma3_slot_layout struct for generating event.  */
void qedma3_start(u32 base, struct edma3_channel_config *cfg)
{
	u32 qchmap;
	if (cfg->complete_code < 32)
		__raw_writel(1 << cfg->complete_code, base + EDMA3_ICR);
	else
		__raw_writel(1 << cfg->complete_code, base + EDMA3_ICRH);
	qchmap = ((EDMA3_CHMAP_PARSET_MASK & cfg->slot)
		  << EDMA3_CHMAP_PARSET_SHIFT) |
		  (cfg->trigger_slot_word << EDMA3_CHMAP_TRIGWORD_SHIFT);
	__raw_writel(qchmap, base + EDMA3_QCHMAP(cfg->chnum));
	__raw_writel(1 << cfg->chnum, base + EDMA3_QSECR);
	__raw_writel(1 << cfg->chnum, base + EDMA3_QEMCR);
	__raw_writel(1 << cfg->chnum, base + EDMA3_QEESR);
}