Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbbEKFLt (ORCPT ); Mon, 11 May 2015 01:11:49 -0400 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:50565 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbbEKFLq convert rfc822-to-8bit (ORCPT ); Mon, 11 May 2015 01:11:46 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: [PATCH v2] dmaengine: bcm2835: Add slave dma support From: Martin Sperl In-Reply-To: <554C9BE0.60205@raspberrypi.org> Date: Mon, 11 May 2015 07:11:43 +0200 Cc: =?utf-8?Q?Noralf_Tr=C3=B8nnes?= , Stephen Warren , dmaengine@vger.kernel.org, vinod.koul@intel.com, Linux Kernel Mailing List , linux-rpi-kernel , dan.j.williams@intel.com, linux-spi Content-Transfer-Encoding: 8BIT Message-Id: <61BE0C45-D46F-4A2E-9B78-E38069398810@martin.sperl.org> References: <1429355160-13657-1-git-send-email-noralf@tronnes.org> <554A69D5.90301@tronnes.org> <554C9BE0.60205@raspberrypi.org> To: Jonathan Bell X-Mailer: Apple Mail (2.2098) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1634 Lines: 36 > On 08.05.2015, at 13:20, Jonathan Bell wrote: >> > I agree that the interrupt generated would be spurious - in the case where it is not required. > > However if you do && (flags & DMA_PREP_INTERRUPT) then all users of this driver need to explicitly set interrupt flags when doing a scatter-gather transfer. As I understand it, currently the only upstream client of this driver is the I2S driver which only uses cyclic anyway. > > Not requiring an interrupt on completion is a bit of an edge case - the default among other dmaengine drivers appears to be to enable interrupts unconditionally. I have now submitted a patch for spi-bcm2835 to make use of dma, so there is one candidate for this kind of behavior. So please go forward with the merge. Also note that with the spi-HW dma support of the bcm2835 it is necessary to do a RX transfer even if the data is not used (similar for TX). Right now we have to allocate a dummy buffer to run these kind of “one-way” transfers where we need 2 DMA channels. The bcm2835 dma hw supports such dummy-transfer modes via BCM2835_DMA_S_IGNORE and BCM2835_DMA_D_IGNORE. So maybe we can add a “flag” to the dmaengine_prep_slave_sg that will allow such kind of behavior to get implemented? That is not a necessity, but would be a welcome improvement. Tested-by: Martin Sperl -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/