Hello,
Martin, Tim wrote:
quoted
Could you tell me where exactly to get the "xuartlite_serial.c"
?
quoted
I could not find "xuartlite_serial.c" in the drivers folder
generated by EDK .
(\ppc405_0\libsrc\linux_mvl31_v1_01_b\linux\drivers\char\xilinx_uartlite
)
Here's the relevant snippet for xulite_send_handler():
/*
* if(pxs->thr_chars[0] != 0) then
* throttle/unthrottle character was just sent;
* do not advance pgs->xmit_tail by ByteCount
* in this case.
*/
if (pxs->thr_chars[0] == 0) {
pxs->tx_int_cnt += ByteCount;
if (pgs->xmit_cnt >= ByteCount) {
pgs->xmit_cnt -= ByteCount;
pgs->xmit_tail += ByteCount;
} else {
pgs->xmit_tail += pgs->xmit_cnt;
pgs->xmit_cnt = 0;
}
if (pgs->xmit_tail >= SERIAL_XMIT_SIZE)
pgs->xmit_tail -= SERIAL_XMIT_SIZE;
} else {
pxs->tx_thr_cnt += ByteCount;
}
This seems to be a part of the fix. IIRC the "default"
gs_flush_buffer() method doesn't work well for UART Lite.
Hence the fix we have done quite some time ago (see below).
It includes the correction pointed out by Tim, and also adds
custom flush_buffer().
The patch is against a custom tree, but it should be easy to
make it apply to the 2.4 kernel tree Tai is using.
Probably this patch was not posted here just because the linuxppc-2.4
kernel tree had been obsoleted, and there was no support for
UART Lite in the kernel.org tree.
Thanks,
Andrei