Re: [PATCH 1/2] spi: davinci: Use SPI framework to handle DMA mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 06, 2017 at 03:57:07PM +0100, Fabien Parent wrote:

> This commit updates the davinci SPI driver in order to use the SPI
> framework to handle the DMA mapping of buffers coming from an upper
> layer.

This claims to be using the framework to do DMA mapping but...

> +		if (!t->rx_buf) {
> +			sg_init_table(&sg_rx, 1);
> +			t->rx_dma = dma_map_single(&spi->dev, dummy_buf,
> +					t->len, DMA_FROM_DEVICE);
> +			if (dma_mapping_error(&spi->dev, !t->rx_dma)) {
> +				ret = -EFAULT;
> +				goto err_rx_map;
> +			}
> +			sg_dma_address(&sg_rx) = t->rx_dma;
> +			sg_dma_len(&sg_rx) = t->len;

...adds code that does DMA mapping.  That's confusing?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux