/* The @regs identifier is provided by a successful call to sa1100_request_dma().  */
void sa1100_reset_dma(dma_regs_t *regs)
/* The @regs identifier is provided by a successful call to sa1100_request_dma().  */
void sa1100_reset_dma(dma_regs_t *regs)
{
	int i;
	for (i = 0; i < SA1100_DMA_CHANNELS; i++)
		if (regs == (dma_regs_t *)&DDAR(i))
			break;
	if (i >= SA1100_DMA_CHANNELS) {
		printk(KERN_ERR "%s: bad DMA identifier\n", __func__);
		return;
	}
	regs->ClrDCSR =
		(DCSR_DONEA | DCSR_DONEB | DCSR_STRTA | DCSR_STRTB |
		 DCSR_IE | DCSR_ERROR | DCSR_RUN);
	regs->DDAR = dma_chan[i].device;
}