Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbcCGRPa (ORCPT ); Mon, 7 Mar 2016 12:15:30 -0500 Received: from yotta.elopez.com.ar ([185.83.216.59]:60610 "EHLO yotta.elopez.com.ar" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752799AbcCGRPV (ORCPT ); Mon, 7 Mar 2016 12:15:21 -0500 Subject: Re: [linux-sunxi] [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users To: Boris Brezillon , Priit Laes References: <1457344771-12946-1-git-send-email-boris.brezillon@free-electrons.com> <1457364641.20836.5.camel@plaes.org> <20160307164702.59f5d9d1@bbrezillon> Cc: Vinod Koul , Dan Williams , dmaengine@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: =?UTF-8?Q?Emilio_L=c3=b3pez?= Message-ID: <56DDB71B.5050801@elopez.com.ar> Date: Mon, 7 Mar 2016 14:15:07 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160307164702.59f5d9d1@bbrezillon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 31 Hi, El 07/03/16 a las 12:47, Boris Brezillon escribi?: (...) >> Does SPI refer the Serial Peripheral Interface? >> >> If yes, then I would point out that current sun4i SPI driver doesn't >> actually use DMA [1] >> >> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/411 >> 722.html > > I just moved this assignment and the associated comment in the driver, > so maybe we should ask Emilio why he thinks SPI config should be the > default one, and how he tested it... When I was working on the dmaengine driver, I needed a way to test mem<->dev and mem<->mem transfers. I used dmatest.ko for the latter, and SPI was a good fit for the former as I had a logic analyzer. That's why there's patches to support DMA on it (but, as Priit pointed out, are not in mainline yet). At first SPI was acting weird when using DMA, but the problems went away when configuring the timings with these magic values you see on the driver today. These timings turned out to also work for audio, so there was no need for a mechanism to configure them. And that's basically the story behind SUN4I_DDMA_MAGIC_SPI_PARAMETERS :) Cheers, Emilio