/* Callers are responsible for ensuring the channel is inactive, and will not be reactivated by linking, chaining, or software calls to edma_start().  */
void edma_free_channel(unsigned channel)
/* Callers are responsible for ensuring the channel is inactive, and will not be reactivated by linking, chaining, or software calls to edma_start().  */
void edma_free_channel(unsigned channel)
{
	unsigned ctlr;
	ctlr = EDMA_CTLR(channel);
	channel = EDMA_CHAN_SLOT(channel);
	if (channel >= edma_info[ctlr]->num_channels)
		return;
	setup_dma_interrupt(channel, NULL, NULL);
	memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(channel),
			&dummy_paramset, PARM_SIZE);
	clear_bit(channel, edma_info[ctlr]->edma_inuse);
}