From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030381AbcCQL64 (ORCPT ); Thu, 17 Mar 2016 07:58:56 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39604 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932879AbcCQL6x (ORCPT ); Thu, 17 Mar 2016 07:58:53 -0400 Date: Thu, 17 Mar 2016 11:58:39 +0000 From: Mark Brown To: Michal Suchanek Cc: Maxime Ripard , Priit Laes , Chen-Yu Tsai , linux-spi , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List , Emilio =?iso-8859-1?Q?L=F3pez?= Message-ID: <20160317115839.GG2566@sirena.org.uk> 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> <20160317072721.GJ30977@lukather> <20160317114308.GF2566@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Dnvf+KcI+0MByPWJ" Content-Disposition: inline In-Reply-To: X-Cookie: Walk softly and carry a megawatt laser. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/2] 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 --Dnvf+KcI+0MByPWJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 17, 2016 at 12:54:08PM +0100, Michal Suchanek wrote: > That's what the driver does. The discussion revolves around the fact > that the driver does not attempt to work (even for very short > transfers) when the DMA channels are not configured and just bails > out. AFAICT the channels are always available when the system is > properly configured and the dmaengine driver loaded. The driver should tell the core about this constraint so the core can split the transfers for it. > Very few device drivers would work with 63byte transfers only and the > code for manually driving the CS line in case the DMA engine fails to > configure will necessarily go untested most of the time since most > systems will have DMA configured properly. A lot of devices will be perfectly happy with 63 byte transfers, register accesses for example tend to be much smaller than that. The manual /CS might be an issue but for most SoCs that is easily addressed by driving the pin as a GPIO if there's an issue. --Dnvf+KcI+0MByPWJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW6pvuAAoJECTWi3JdVIfQTI0H/0qJ3bLq4du8sXxuXtJypJum unmWRW1q+96LW2ETqPi6CWs/NQqdvr7Rv/v0PpgJqcCOjD5gLueVpeyexVIZCHS0 QQTtZ9qyHkvZ8JwvYMGataZFA/lQxtZw1cKAXrwdgsbFSjMZ/FOo7KPgB2vDDsfQ GFYwZkZovVotsJ8ny6ek46HLy9YLY5ZdM9e/49bZDFD2BVgoBtEkIqinuGagS0G1 XGsm4mDofzht2urbB/dl6sm4s4D/P6cPZ7x+gpm99gMAkZxS0fudAjanRO1EnKJs JPnTdrW0te5uSK6zjvQNwBw+rlA+2UMjzguQ6icTl7ts5b1HJEBOAYxbmaexSNU= =Og60 -----END PGP SIGNATURE----- --Dnvf+KcI+0MByPWJ-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 1/2] spi: sun4i: add DMA support Date: Thu, 17 Mar 2016 11:58:39 +0000 Message-ID: <20160317115839.GG2566@sirena.org.uk> 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> <20160317072721.GJ30977@lukather> <20160317114308.GF2566@sirena.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Dnvf+KcI+0MByPWJ" Cc: Maxime Ripard , Priit Laes , Chen-Yu Tsai , linux-spi , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Linux Kernel Mailing List , Emilio =?iso-8859-1?Q?L=F3pez?= To: Michal Suchanek Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: --Dnvf+KcI+0MByPWJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 17, 2016 at 12:54:08PM +0100, Michal Suchanek wrote: > That's what the driver does. The discussion revolves around the fact > that the driver does not attempt to work (even for very short > transfers) when the DMA channels are not configured and just bails > out. AFAICT the channels are always available when the system is > properly configured and the dmaengine driver loaded. The driver should tell the core about this constraint so the core can split the transfers for it. > Very few device drivers would work with 63byte transfers only and the > code for manually driving the CS line in case the DMA engine fails to > configure will necessarily go untested most of the time since most > systems will have DMA configured properly. A lot of devices will be perfectly happy with 63 byte transfers, register accesses for example tend to be much smaller than that. The manual /CS might be an issue but for most SoCs that is easily addressed by driving the pin as a GPIO if there's an issue. --Dnvf+KcI+0MByPWJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW6pvuAAoJECTWi3JdVIfQTI0H/0qJ3bLq4du8sXxuXtJypJum unmWRW1q+96LW2ETqPi6CWs/NQqdvr7Rv/v0PpgJqcCOjD5gLueVpeyexVIZCHS0 QQTtZ9qyHkvZ8JwvYMGataZFA/lQxtZw1cKAXrwdgsbFSjMZ/FOo7KPgB2vDDsfQ GFYwZkZovVotsJ8ny6ek46HLy9YLY5ZdM9e/49bZDFD2BVgoBtEkIqinuGagS0G1 XGsm4mDofzht2urbB/dl6sm4s4D/P6cPZ7x+gpm99gMAkZxS0fudAjanRO1EnKJs JPnTdrW0te5uSK6zjvQNwBw+rlA+2UMjzguQ6icTl7ts5b1HJEBOAYxbmaexSNU= =Og60 -----END PGP SIGNATURE----- --Dnvf+KcI+0MByPWJ-- -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: broonie@kernel.org (Mark Brown) Date: Thu, 17 Mar 2016 11:58:39 +0000 Subject: [PATCH 1/2] spi: sun4i: add DMA support In-Reply-To: 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> <20160317072721.GJ30977@lukather> <20160317114308.GF2566@sirena.org.uk> Message-ID: <20160317115839.GG2566@sirena.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Mar 17, 2016 at 12:54:08PM +0100, Michal Suchanek wrote: > That's what the driver does. The discussion revolves around the fact > that the driver does not attempt to work (even for very short > transfers) when the DMA channels are not configured and just bails > out. AFAICT the channels are always available when the system is > properly configured and the dmaengine driver loaded. The driver should tell the core about this constraint so the core can split the transfers for it. > Very few device drivers would work with 63byte transfers only and the > code for manually driving the CS line in case the DMA engine fails to > configure will necessarily go untested most of the time since most > systems will have DMA configured properly. A lot of devices will be perfectly happy with 63 byte transfers, register accesses for example tend to be much smaller than that. The manual /CS might be an issue but for most SoCs that is easily addressed by driving the pin as a GPIO if there's an issue. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: not available URL: