[PATCH] mmci: sync DATAEND irq with dma transfer done

Vitaly Wool vitalywool at gmail.com
Wed Apr 20 13:58:40 EDT 2011

On Wed, Apr 20, 2011 at 7:17 PM, Linus Walleij <linus.walleij at linaro.org> wrote:
> What we need is a DMAXFERCOMPLETE flag so we know that
> the DMA state machine is really finished. Sadly the hardware lacks
> such a status flag, so there is no way to know that the DMA state
> machine is finished by looking at any status registers in the
> MMCI block.
> We are thus reliant on the other end of the bitpipe telling us
> it's finished.

Okay, but can't we have something like this then in the unmap function:

       for (i = 0; i < 100; i++) {
               status = readl(host->base + MMCISTATUS);
               if (host->unreliable_rxflags) {
                       if (host->dataend)
               } else if (!(status & MCI_RXDATAAVLBLMASK))

to minimize the changes and apparently address Russell's concern as well?


More information about the linux-arm-kernel mailing list