[PATCH 05/15] tty: serial: Add 8250-core based omap driver
From: Lennart Sorensen <hidden>
Date: 2014-08-15 19:33:56
Also in:
linux-omap, linux-serial, lkml
On Fri, Aug 15, 2014 at 09:27:59PM +0200, Sebastian Andrzej Siewior wrote:
If you want to change this to reduce the gap, then you have first change 8250 core code. Currently it waits until the shift register is empty.
Oh the 8250 normally works this way? I didn't know that.
On the other hand if you use DMA then it can handle transfers > 64bytes in one go and you can start transfers while the FIFO is not completely empty.
You can dma more than the fifo size?
If you use DMA. You program one transfer says 100 bytes. You get an dma-transfer complete once the 100 bytes are transfered which means the FIFO has 63 bytes. From this point on you could enqueue the next transfer with say another 100 bytes. In that scenario you don't see the gap. You get only to the gap if you use the non-DMA mode (and not UARTs support DMA). In that case, yes waiting till there only 16 bytes before starting the refill would make sense if you want to utilize the port by 100%. But as I said in 0/15, you need to teach the core this first. Otherwise it will return doing nothing until the shift register is empty (i.e. until the FIFO is completely empty).
Well if DMA takes care of it, and the normal 8250 is already like this, then I suppose it is already better than the typical case.
There is patch in Greg's tty tree already where you are able to configure the RX trigger level. We could wire this up once we agree which levels we want support. The OMAP supports all levels from 1?63.
All? or just every 4 (that's what I just read in the DRA7xx docs).
Yes, true. However this is only an issue without HW control. With DMA the buffer is slightly larger. The DMA engine starts the transfer on its own once there 48 bytes in the FIFO (except in the few cases where it does not).
That's nice of it. I will have to give this a try. -- Len Sorensen