From mboxrd@z Thu Jan 1 00:00:00 1970 From: "S, Venkatraman" Subject: Re: [RFC PATCH 08/13] mmc: omap_hsmmc: limit max_segs with the EDMA DMAC Date: Fri, 21 Sep 2012 23:03:42 +0530 Message-ID: References: <1348152226-13588-1-git-send-email-mporter@ti.com> <1348152226-13588-9-git-send-email-mporter@ti.com> <20120921171840.GB10409@arwen.pp.htv.fi> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120921171840.GB10409-S8G//mZuvNWo5Im9Ml3/Zg@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: balbi-l0cyMroinI0@public.gmane.org Cc: Matt Porter , Linux DaVinci Kernel List , Linux OMAP List , Russell King , Benoit Cousson , Arnd Bergmann , Linux Documentation List , Tony Lindgren , Linux MMC List , Devicetree Discuss , Mark Brown , Sekhar Nori , Linux Kernel Mailing List , Rob Herring , Vinod Koul , Rob Landley , Dan Williams , Linux SPI Devel List , Chris Ball , Linux ARM Kernel List List-Id: devicetree@vger.kernel.org On Fri, Sep 21, 2012 at 10:48 PM, Felipe Balbi wrote: > On Fri, Sep 21, 2012 at 10:47:30PM +0530, S, Venkatraman wrote: >> On Fri, Sep 21, 2012 at 10:45 PM, 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 ? >> >> If you are adventurous, this can be a generic mmc DT binding instead >> of restricting it to OMAP. > > I say if it's a limitation in the DMAC, then DMAC's driver should handle > it, no ? Meaning that in this case you would copy from one multi-segment > sg into a one-segment sg and when transfer is complete, before calling > user's callback, copy data the other way around (?) > Right ! So even if the property is defined for MMC, Matt will end up coding the limitation into every peripheral driver that uses EMAC, which doesn't scale. Your solution is better. ------------------------------------------------------------------------------ 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