From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 08/10 RESEND] spi: Add DMA support into SPI driver Date: Wed, 1 Aug 2012 21:34:48 +0100 Message-ID: <20120801203448.GX4483@opensource.wolfsonmicro.com> References: <1343076052-27312-1-git-send-email-marex@denx.de> <1343076052-27312-9-git-send-email-marex@denx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Fabio Estevam , Shawn Guo , Attila Kinali , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Chris Ball , Dong Aisheng , Linux ARM kernel To: Marek Vasut Return-path: Content-Disposition: inline In-Reply-To: <1343076052-27312-9-git-send-email-marex-ynQEQJNshbs@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Mon, Jul 23, 2012 at 10:40:50PM +0200, Marek Vasut wrote: > + /* > + * Small blocks can be transfered via PIO. > + * Measured by empiric means: > + * > + * dd if=/dev/mtdblock0 of=/dev/null bs=1024k count=1 > + * > + * DMA only: 2.164808 seconds, 473.0KB/s > + * Combined: 1.676276 seconds, 610.9KB/s > + */ I've seen other devices end up using the FIFO length as the decision point here which makes intuitive sense to me unless the FIFO is extremely deep. Not reviewed this properly yet but it looks OK from a first read through. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/