/* Note: first step is the protocol driver prepares a dma-capable memory, and this func just need translate the virt addr to physical  */
static int map_dma_buffers(struct dw_spi *dws)
/* Note: first step is the protocol driver prepares a dma-capable memory, and this func just need translate the virt addr to physical  */
static int map_dma_buffers(struct dw_spi *dws)
{
	if (!dws->cur_msg->is_dma_mapped || !dws->dma_inited
		|| !dws->cur_chip->enable_dma)
		return 0;
	if (dws->cur_transfer->tx_dma)
		dws->tx_dma = dws->cur_transfer->tx_dma;
	if (dws->cur_transfer->rx_dma)
		dws->rx_dma = dws->cur_transfer->rx_dma;
	return 1;
}