[Q] PL011 DMA Rx, using ste_dma40

Guennadi Liakhovetski g.liakhovetski at gmx.de
Wed Nov 27 15:45:25 EST 2013


On Wed, 27 Nov 2013, Russell King - ARM Linux wrote:

> On Wed, Nov 27, 2013 at 05:38:43PM +0100, Guennadi Liakhovetski wrote:
> > I'm trying to get a PL011 UART to work in DMA mode with an alternative 
> > DMAC. Transmission works, reception is more problematic. I can receive a 
> > complete page of data (4096 bytes), but nothing below that triggers a 
> > reception. Is this expected if no polling is used, as configured by the 
> > dma_rx_poll_timeout platform parameter, or should it work, triggered by 
> > the Rx timeout UART interrupt?
> 
> Yes, there's a very basic hardware design error here.
> 
> The PL011 does, as you've noticed, have a Rx timeout interrupt.  This
> timeout interrupt only fires if you leave data in the Rx FIFO.
> 
> This means that when you use DMA, for the hardware to operate correctly,
> you must _not_ have the DMA engine fully empty the Rx FIFO, otherwise
> interactive use is impossible.

Thanks, Russell, this perfectly answers my question.

> I wrote about this when I looked at DMA on the ARM Realview boards.
> I came to the conclusion that was just better to completely ignore the
> hardware DMA side of PL011 and just use PIO.

Regards
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/



More information about the linux-arm-kernel mailing list