Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755832AbcCQH11 (ORCPT ); Thu, 17 Mar 2016 03:27:27 -0400 Received: from down.free-electrons.com ([37.187.137.238]:39208 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753414AbcCQH1Y (ORCPT ); Thu, 17 Mar 2016 03:27:24 -0400 Date: Thu, 17 Mar 2016 08:27:21 +0100 From: Maxime Ripard To: Michal Suchanek Cc: Mark Brown , Priit Laes , Chen-Yu Tsai , linux-spi , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , Emilio =?iso-8859-1?Q?L=F3pez?= Subject: Re: [PATCH 1/2] spi: sun4i: add DMA support Message-ID: <20160317072721.GJ30977@lukather> References: <1456466217-6793-1-git-send-email-plaes@plaes.org> <1456466217-6793-2-git-send-email-plaes@plaes.org> <20160226122504.GR18327@sirena.org.uk> <20160306214206.GW8418@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ssZxAlvqSOvXAj81" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2997 Lines: 77 --ssZxAlvqSOvXAj81 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 10, 2016 at 10:01:04AM +0100, Michal Suchanek wrote: > Hello, >=20 > On 6 March 2016 at 22:42, Maxime Ripard > wrote: > > On Fri, Feb 26, 2016 at 01:51:51PM +0100, Michal Suchanek wrote: >=20 > >> Besides this non-technical objection there were multiple technical > >> objections. > >> > >> IIRC one was that the driver does not handle the case when the DMA > >> channels are not available. As I understand it the channels are > >> exclusively reserved for a particular peripherial on sunxi platform so > >> this ShoulNotHappen(tm). So it's probably fine for the driver to fail > >> probe when you have broken DT or no DMA engine support for sunxi > >> platform. > > > > There's a quite trivial scenario that would trigger this: if the dma > > driver or dmaengine is not enabled / loaded. >=20 > There are other trivial scenarios under which the driver will fail > like loading wrong DT, not compiling or loading the sunxi pinmux > driver, and whatnot. I don't see what the pinmux has to do with SPI and DMA, and you're wrong, the pinmux driver is always compiled in if you enable the sunxi support. And you're missing the whole point. DMA accesses are optional, pinmux and proper machine support are not. > When you misconfigure your kernel it does not work. So long as the > driver just fails and does not crash and burn it's normal. Since the > driver is pretty much useless without DMA as it is now (63 byte > transfer limit) losing the non-DMA functionality when DMA engine is > not compiled-in does not seem that terrible. You're mixing two things up: the fact that we can't do more than the FIFO length in PIO and that we're missing DMA support. We have patches to address both, and there's no depedency between the two. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --ssZxAlvqSOvXAj81 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW6lxZAAoJEBx+YmzsjxAgWfgP/11/1n3BoOGXXEUEruBZk2WP gLXzYJ7OZPOTDtNpYuUnbqjgRP9J5sM5BL9idVJydSRXTROWjAmFEtOxOza7GuE8 rtCldTVmDHrKLiJMEmO0DiXSK1LMTJuS9MyU8ERHdzqebDmRp4LpaAkv56PHvtot 33oqy6KA8HICmOp5xOYR8lJjbLshg28OK0u6ylQ6AtAD1HqksWI9AJQyyG4Woy3y 2YxpwUT5zpfvQVePr9swc1QFmQSyN5rG3CiPX9N5wN3Op+/U9cSLhbAAesOyZ9XL 84c/Hg6nJlhnTbIGcxU6hW0e/1fGHQPpLuJgOSSiOYPHSUV0aij3NectYkbDrOMr qgzmnhU9YYKMQKEPvZ+8fDYe33N2/tv0snvQf4RXpkcpY0FTm5WziJZI6HJoprpO aQW6Y+D7GSq4Npf/0SvynbEwlzjsaYyDh+cuMcALmuFTie2hkcGn9MYhP9brSX48 uwRwPmp62bJXPFrtTgOm0Huk4uvnW4DBOxMWRxx8imzCCX4tnCoHeqDcPUEGg2Kk S6zIH95mu5HBIt/DCEQ09qbLhl3irpF3QTy+4z8NPnFngYw1B85DtRy3Ib9uJWLX HxDV8+DdnuUvxQS+Ywr9HZJfXu4yp+FOtD4WisPxGCQnx0vmkXfJbattfc6KeEZR ltDeRdNSx89yLjhLOVoM =C55V -----END PGP SIGNATURE----- --ssZxAlvqSOvXAj81--