Thread (52 messages) 52 messages, 9 authors, 2012-10-09

[RFC PATCH 08/13] mmc: omap_hsmmc: limit max_segs with the EDMA DMAC

From: Matt Porter <hidden>
Date: 2012-09-21 18:41:15
Also in: linux-devicetree, linux-mmc, linux-omap, linux-spi, lkml

On Fri, Sep 21, 2012 at 10:47:30PM +0530, S, Venkatraman wrote:
On Fri, Sep 21, 2012 at 10:45 PM, S, Venkatraman [off-list ref] wrote:
quoted
On Thu, Sep 20, 2012 at 8:13 PM, Matt Porter [off-list ref] wrote:
quoted
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 think it's bad practice to add something to a binding that is not part
of the hardware definition for the device. In this case, the limitations
comes strictly from the DMAC. As I noted, the proper fix for this is to
have the DMA Engine API extended to allow querying the DMAC SG
capabilities before setting up a DMA transfer. I brought this up
previously in the thread where the actual EDMA dmaengine wrapper driver
was discussed and Vinod indicated that he was open to dmaengine
providing this information.

It makes sense as DMA Engine should tell the slave driver everything it
needs to know to set up a transfer...this is just a missing piece right
now. FWIW, we have this issue in davinci_mmc.c as well...it just was
already hardcoded with a value to satisfy the EDMA DMAC. However, I'd
like to see that go away as well.

-Matt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help