From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbbHTS7W (ORCPT ); Thu, 20 Aug 2015 14:59:22 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54124 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbbHTS7U (ORCPT ); Thu, 20 Aug 2015 14:59:20 -0400 Date: Thu, 20 Aug 2015 11:58:50 -0700 From: Mark Brown To: Emilio =?iso-8859-1?Q?L=F3pez?= Cc: linux-sunxi@googlegroups.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Message-ID: <20150820185850.GQ12027@sirena.org.uk> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ngPZezdD7QsvFaqQ" Content-Disposition: inline In-Reply-To: X-Cookie: You are fairminded, just and loving. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 69.84.245.29 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 4/9] spi: sun4i: add DMA support X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ngPZezdD7QsvFaqQ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 20, 2015 at 02:19:46PM -0000, Emilio L=F3pez wrote: > - sun4i_spi_drain_fifo(sspi, SUN4I_FIFO_DEPTH); > + if (sun4i_spi_can_dma(master, spi, tfr) && desc_rx) { > + /* The receive transfer should be the last one to finish */ > + dma_wait_for_async_tx(desc_rx); What if it's a transmit only transfer? We'll fall over to this... > + } else { > + sun4i_spi_drain_fifo(sspi, SUN4I_FIFO_DEPTH); > + } =2E..which manually reads data from the FIFO which doesn't seem like what we want, won't it conflict with the DMA? --ngPZezdD7QsvFaqQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV1iNlAAoJECTWi3JdVIfQFLIH/2UXA3usybggQn4ENf6HmiFe Us53J220IBIlDI+tKxxrI/lZUSkz2NDHjloYOirVPgdQWnuCcHNXoIE8iOM314cy 2dBweYIVJoeXZqyJuzqxENYdyNPcHTyuywtEJ8KoacyHwk7803oSfDSzMSwrMBN7 QuPH3CO9rmeFXSk6zhsugK250SE0CZpjlux+rOKKK6SXeRwcNqBQuL8qv83vmgJw ApX3NC7LI+btSVcfkQKFb14h1gHwNXeP/c2xOujvFefNeqhVb+TBHegac9JszzNm zihH6pVn3xloJeCKuU0Hgo2htSbSCnnzZ24zDqx7JHMlND0kpe7dMn9vIjIMOys= =VnTT -----END PGP SIGNATURE----- --ngPZezdD7QsvFaqQ--