From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbdBFQsf (ORCPT ); Mon, 6 Feb 2017 11:48:35 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:45332 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbdBFQsd (ORCPT ); Mon, 6 Feb 2017 11:48:33 -0500 Date: Mon, 6 Feb 2017 16:48:25 +0000 From: Mark Brown To: Fabien Parent Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, nsekhar@ti.com, ptitiano@baylibre.com, khilman@baylibre.com Message-ID: <20170206164825.7daqoxyv4zmbafyn@sirena.org.uk> References: <20170206145708.24356-1-fparent@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vpdhjht6tyy4toee" Content-Disposition: inline In-Reply-To: <20170206145708.24356-1-fparent@baylibre.com> X-Cookie: Please go away. User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5:7e7a:91ff:fede:4a45 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/2] spi: davinci: Use SPI framework to handle DMA mapping X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vpdhjht6tyy4toee Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? --vpdhjht6tyy4toee Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAliYqNgACgkQJNaLcl1U h9DEJwf+LPM0CyzgJlabyJ/0UCt/3ou0+9EqMC9MjIh7cffnjQqzajbm4eWEKVJT aO8HOffdi+OCd4Ynpi0x43AL5RCLqAgcQvM6hTNJopx1NxVCe0svy6aObGOq4SSY brC+rrh8ES81i1xMSK/z02bDRMQLiBYkJFc5s246xv9PZ6Sxy1t00V486NT2ImVk e/inFX02yMimcVFYdpJqBBeJnOSj7ax8Mq4nzKtJPWQV6lYAx6Gt2ctUEbaduY9m 4uvn7Xhk+I6/yGHdHj18hKIgJHYDwEly6EiF4KecFwh1bR6Yg3jcB0JnJ6FNz2SN tsBJcWLzfmxtnI5WsWCf3FF/4oVsog== =jAHD -----END PGP SIGNATURE----- --vpdhjht6tyy4toee--