From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Porter Subject: Re: [RFC PATCH 08/13] mmc: omap_hsmmc: limit max_segs with the EDMA DMAC Date: Fri, 21 Sep 2012 15:03:12 -0400 Message-ID: <20120921190312.GL16522@beef> References: <1348152226-13588-1-git-send-email-mporter@ti.com> <1348152226-13588-9-git-send-email-mporter@ti.com> <20120921184721.GD31374@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120921184721.GD31374-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Russell King - ARM Linux Cc: Linux DaVinci Kernel List , Linux OMAP List , Benoit Cousson , Arnd Bergmann , Linux Documentation List , Tony Lindgren , Devicetree Discuss , Mark Brown , Linux MMC List , Linux Kernel Mailing List , Rob Herring , Vinod Koul , Chris Ball , Rob Landley , Dan Williams , Linux SPI Devel List , "S, Venkatraman" , Linux ARM Kernel List List-Id: linux-mmc@vger.kernel.org On Fri, Sep 21, 2012 at 07:47:21PM +0100, Russell King wrote: > On Fri, Sep 21, 2012 at 10:45:29PM +0530, S, Venkatraman wrote: > > On Thu, Sep 20, 2012 at 8:13 PM, Matt Porter wrote: > > > The EDMA DMAC has a hardware limitation that prevents supporting > > > scatter gather lists with any number of segments. Since the EDMA > > > DMA Engine driver sets the maximum segments to 16, we do the > > > same. > > > > > > Note: this can be removed once the DMA Engine API supports an > > > API to query the DMAC's segment limitations. > > > > > > > I wouldn't want to bind the properties of EDMA to omap_hsmmc as this patch > > suggests. Why don't we have a max_segs property, which when explicitly specified > > in DT, will override the default ? > > Why not have a generic way that DMA engine can export these kinds of > properties? That's exactly what my note above is suggesting... Something along the lines of: struct slave_sg_caps { int max_segs; /* <0 is no limit */ } struct slave_sg_cap * dmaengine_get_slave_sg_caps(struct dma_chan *chan); I'm sure there are or will be other characteristics worth providing to slave drivers. -Matt ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: mporter@ti.com (Matt Porter) Date: Fri, 21 Sep 2012 15:03:12 -0400 Subject: [RFC PATCH 08/13] mmc: omap_hsmmc: limit max_segs with the EDMA DMAC In-Reply-To: <20120921184721.GD31374@n2100.arm.linux.org.uk> References: <1348152226-13588-1-git-send-email-mporter@ti.com> <1348152226-13588-9-git-send-email-mporter@ti.com> <20120921184721.GD31374@n2100.arm.linux.org.uk> Message-ID: <20120921190312.GL16522@beef> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Sep 21, 2012 at 07:47:21PM +0100, Russell King wrote: > On Fri, Sep 21, 2012 at 10:45:29PM +0530, S, Venkatraman wrote: > > On Thu, Sep 20, 2012 at 8:13 PM, Matt Porter wrote: > > > The EDMA DMAC has a hardware limitation that prevents supporting > > > scatter gather lists with any number of segments. Since the EDMA > > > DMA Engine driver sets the maximum segments to 16, we do the > > > same. > > > > > > Note: this can be removed once the DMA Engine API supports an > > > API to query the DMAC's segment limitations. > > > > > > > I wouldn't want to bind the properties of EDMA to omap_hsmmc as this patch > > suggests. Why don't we have a max_segs property, which when explicitly specified > > in DT, will override the default ? > > Why not have a generic way that DMA engine can export these kinds of > properties? That's exactly what my note above is suggesting... Something along the lines of: struct slave_sg_caps { int max_segs; /* <0 is no limit */ } struct slave_sg_cap * dmaengine_get_slave_sg_caps(struct dma_chan *chan); I'm sure there are or will be other characteristics worth providing to slave drivers. -Matt From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757678Ab2IUTBa (ORCPT ); Fri, 21 Sep 2012 15:01:30 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:51459 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756608Ab2IUTB2 (ORCPT ); Fri, 21 Sep 2012 15:01:28 -0400 Date: Fri, 21 Sep 2012 15:03:12 -0400 From: Matt Porter To: Russell King - ARM Linux Cc: "S, Venkatraman" , Linux DaVinci Kernel List , Linux OMAP List , Benoit Cousson , Arnd Bergmann , Linux Documentation List , Tony Lindgren , Linux MMC List , Devicetree Discuss , Mark Brown , Linux Kernel Mailing List , Rob Herring , Grant Likely , Vinod Koul , Rob Landley , Dan Williams , Linux SPI Devel List , Chris Ball , Linux ARM Kernel List Subject: Re: [RFC PATCH 08/13] mmc: omap_hsmmc: limit max_segs with the EDMA DMAC Message-ID: <20120921190312.GL16522@beef> References: <1348152226-13588-1-git-send-email-mporter@ti.com> <1348152226-13588-9-git-send-email-mporter@ti.com> <20120921184721.GD31374@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120921184721.GD31374@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2012 at 07:47:21PM +0100, Russell King wrote: > On Fri, Sep 21, 2012 at 10:45:29PM +0530, S, Venkatraman wrote: > > On Thu, Sep 20, 2012 at 8:13 PM, Matt Porter wrote: > > > The EDMA DMAC has a hardware limitation that prevents supporting > > > scatter gather lists with any number of segments. Since the EDMA > > > DMA Engine driver sets the maximum segments to 16, we do the > > > same. > > > > > > Note: this can be removed once the DMA Engine API supports an > > > API to query the DMAC's segment limitations. > > > > > > > I wouldn't want to bind the properties of EDMA to omap_hsmmc as this patch > > suggests. Why don't we have a max_segs property, which when explicitly specified > > in DT, will override the default ? > > Why not have a generic way that DMA engine can export these kinds of > properties? That's exactly what my note above is suggesting... Something along the lines of: struct slave_sg_caps { int max_segs; /* <0 is no limit */ } struct slave_sg_cap * dmaengine_get_slave_sg_caps(struct dma_chan *chan); I'm sure there are or will be other characteristics worth providing to slave drivers. -Matt