From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Vignesh R <vigneshr-l0cyMroinI0@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read()
Date: Tue, 12 Apr 2016 05:31:15 +0100 [thread overview]
Message-ID: <20160412043115.GV3351@sirena.org.uk> (raw)
In-Reply-To: <1459828192-5531-2-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
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...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Vignesh R <vigneshr@ti.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] spi: Add DMA support for spi_flash_read()
Date: Tue, 12 Apr 2016 05:31:15 +0100 [thread overview]
Message-ID: <20160412043115.GV3351@sirena.org.uk> (raw)
In-Reply-To: <1459828192-5531-2-git-send-email-vigneshr@ti.com>
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
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...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-04-12 4:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 3:49 [PATCH 0/2] spi: Add DMA support for ti-qspi Vignesh R
2016-04-05 3:49 ` Vignesh R
[not found] ` <1459828192-5531-1-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
2016-04-05 3:49 ` [PATCH 1/2] spi: Add DMA support for spi_flash_read() Vignesh R
2016-04-05 3:49 ` Vignesh R
2016-04-05 3:49 ` Vignesh R
[not found] ` <1459828192-5531-2-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
2016-04-12 4:31 ` Mark Brown [this message]
2016-04-12 4:31 ` Mark Brown
2016-04-12 8:20 ` Vignesh R
2016-04-12 8:20 ` Vignesh R
2016-04-05 3:49 ` [PATCH 2/2] spi: spi-ti-qspi: Add DMA support for QSPI mmap read Vignesh R
2016-04-05 3:49 ` Vignesh R
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=20160412043115.GV3351@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vigneshr-l0cyMroinI0@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.