No subject


Fri Oct 22 17:57:35 EDT 2010


For SREQ:
	For receive: Asserted if data counter is
	zero and receive FIFO contains more than
	one and fewer than eight words.
	For transmit: Asserted if fewer than eight
	and more than one word remain for
	transfer to FIFO.

For BREQ:
	For receive: Asserted if FIFO contains
	eight words and data counter is not zero,
	or if FIFO contains more than eight words.
	For transmit: Asserted if more than eight
	words remain for transfer to FIFO.

For LSREQ:
	For receive: Asserted if data counter is
	zero and FIFO contains only one word.
	For transmit: Asserted if only one word
	remains for transfer to FIFO.

For LBREQ:
	For receive: Asserted if data counter is
	zero and FIFO contains eight words.
	For transmit: Asserted if only eight words
	remain for transfer to FIFO.

So, for small transfers (less than half the FIFO depth), SREQ will be
asserted to transfer a single word at a time, and LSREQ for the last
word.  There shouldn't be any bursts from the DMA controller.

The second argument is that if you have a burst size of, say, 8 words
and you program the DMA to transfer 4 words, it should _not_ transfer
8 words to the peripheral.

> What it does is to emulate single requests below a certain
> threshold by requesting one-word bursts. I think this is
> primarily for SDIO, not card transfers.

This should be handled in hardware, if not it's DMA controller specific
as it shouldn't burst past the remainder of the transfer.  If your DMA
controller does burst past the number of bytes in the transfer, surely
that's something that your DMA controller code needs to work around?

> > +       /* Check for weird stuff in the sg list */
> > +       /* shouldn't this be in the DMA engine driver? */
> > +       for_each_sg(data->sg, sg, data->sg_len, i) {
> > +               dev_vdbg(mmc_dev(host->mmc), "MMCI SGlist %d dir %d: length: %08
> > +                        i, conf.direction, sg->length);
> > +               if (sg->offset & 3 || sg->length & 3)
> > +                       return -EINVAL;
> > +       }
> 
> This one is just overcautious and for SDIO we don't even want to do
> such things, so it should be dropped altogether.
> 
> The original intent was to avoid writing anything than 32bit words
> into the register, and with the SDIO-modified versions you can
> actually do that.

Surely that's to do with the DMA controller though?

> So I'll drop it for the next iteration.

Given that I've already heavily modified the code, it's probably better if
you just let me know the answer... ;)



More information about the linux-arm-kernel mailing list