/* The @regs identifier is provided by a successful call to sa1100_request_dma().  */
dma_addr_t sa1100_get_dma_pos(dma_regs_t *regs)
/* The @regs identifier is provided by a successful call to sa1100_request_dma().  */
dma_addr_t sa1100_get_dma_pos(dma_regs_t *regs)
{
	int status;
	status = regs->RdDCSR;
	if ((!(status & DCSR_BIU) &&  (status & DCSR_STRTA)) ||
	    ( (status & DCSR_BIU) && !(status & DCSR_STRTB)))
		return regs->DBSA;
	else
		return regs->DBSB;
}