[PATCH] mmci: restrict DMA usage to large, even multiblock transfers

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Feb 1 09:44:37 EST 2011

On Tue, Feb 01, 2011 at 03:07:12PM +0100, Linus Walleij wrote:
> 2011/2/1 Russell King - ARM Linux <linux at arm.linux.org.uk>:
> > So... I think this patch will work fine on ST variants, returning the
> > DMA request signals back to their classic meaning.  That being LSREQ
> > is only activated on the _final_ transfer rather than the last 8
> > transfers, which as Linus describes makes your DMA controller complete
> > on the 8th-to-last transfer.
> I've tested this patch on MMC and SD on U8500 and it works
> fine, so
> Tested-by: Linus Walleij <linus.walleij at linaro.org>
> However I think this weird bit turning off all single requests
> is there for some reason and I still try to find out what the
> usecase really is. I highly suspect that it's related to either
> doing some SDIO usecase or pleasing some buggy DMA
> controller.

We aren't turning off single requests - by clearing DMAREQCTL, we're
actually turning them back on.

What I think is going on is someone had an idea of using LBREQ to
transfer the last one to seven transfers as a burst, rather than one
to seven separate single transfers as an optimization.  However, this
can only work if the DMA controller obeys the transfer count and doesn't
try to transfer more than the remainder of the transfer in any burst.
IOW, the DMAC has to truncate bursts to the smaller of the burst size
and remainder.  If it can't, DMAREQCTL causes problems.

I assume that the U8500/U300 documentation isn't publically available...
A quick google doesn't seem to help.

More information about the linux-arm-kernel mailing list