Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376442

Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read()

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read()
Date 2016-04-12 06:40 +0200
Message-ID <rmYhk-15d-3@gated-at.bofh.it> (permalink)
References <rkqjM-5iu-15@gated-at.bofh.it> <rkqjM-5iu-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Apr 05, 2016 at 09:19:51AM +0530, Vignesh R wrote:

>  	mutex_lock(&master->bus_lock_mutex);
> +	if (master->dma_rx) {
> +		rx_dev = master->dma_rx->device->dev;
> +		ret = spi_map_buf(master, rx_dev, &msg->rx_sg,
> +				  msg->buf, msg->len,
> +				  DMA_FROM_DEVICE);
> +		if (ret != 0)
> +			goto  err;
> +	}

This is unconditionally DMA mapping the buffer if DMA is supported.
That's going to be common but I'm not sure it'll be universal, we need
to think of something better here.  I'm not immediately seeing what
though.  Possibly a flag...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] spi: Add DMA support for spi_flash_read() Vignesh R <vigneshr@ti.com> - 2016-04-05 06:00 +0200
  Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read() Mark Brown <broonie@kernel.org> - 2016-04-12 06:40 +0200
    Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read() Vignesh R <vigneshr@ti.com> - 2016-04-12 10:30 +0200

csiph-web