mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Fabien Parent <fparent@baylibre.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	nsekhar@ti.com, ptitiano@baylibre.com, khilman@baylibre.com
Subject: Re: [PATCH 1/2] spi: davinci: Use SPI framework to handle DMA mapping
Date: Mon, 6 Feb 2017 16:48:25 +0000	[thread overview]
Message-ID: <20170206164825.7daqoxyv4zmbafyn@sirena.org.uk> (raw)
In-Reply-To: <20170206145708.24356-1-fparent@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2017-02-06 16:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 14:57 Fabien Parent
2017-02-06 14:57 ` [PATCH 2/2] spi: davinci: enable DMA when channels are defined in DT Fabien Parent
2017-03-07 14:22   ` Applied "spi: davinci: enable DMA when channels are defined in DT" to the spi tree Mark Brown
2017-03-08 10:35     ` Frode Isaksen
2017-03-08 12:43       ` Mark Brown
2017-03-10 10:24         ` Frode Isaksen
2017-03-13 16:43           ` Mark Brown
2017-02-06 16:48 ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170206164825.7daqoxyv4zmbafyn@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=fparent@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=ptitiano@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®