Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d6b698764084510fe6168bb5b650165dced03ae Commit: 1d6b698764084510fe6168bb5b650165dced03ae Parent: 7ae0fa49c6502ca1ada0e043c5d25ee73c0a28c6 Author: Grant Likely <[EMAIL PROTECTED]> AuthorDate: Tue Oct 23 14:27:46 2007 +1000 Committer: Josh Boyer <[EMAIL PROTECTED]> CommitDate: Thu Nov 1 07:12:19 2007 -0500
[POWERPC] Uartlite: speed up console output Change the wait_tx routine to call cpu_relax() instead of udelay() to reduce console output latency and test for the TXFULL bit instead of TXEMPTY. That way the FIFO doesn't need to by 100% flushed before writing the next character. Signed-off-by: Grant Likely <[EMAIL PROTECTED]> Acked-by: Peter Korsgaard <[EMAIL PROTECTED]> Signed-off-by: Josh Boyer <[EMAIL PROTECTED]> --- drivers/serial/uartlite.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index dfef83f..a85f2d3 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -329,12 +329,14 @@ static struct uart_ops ulite_ops = { static void ulite_console_wait_tx(struct uart_port *port) { int i; + u8 val; - /* wait up to 10ms for the character(s) to be sent */ - for (i = 0; i < 10000; i++) { - if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY) + /* Spin waiting for TX fifo to have space available */ + for (i = 0; i < 100000; i++) { + val = readb(port->membase + ULITE_STATUS); + if ((val & ULITE_STATUS_TXFULL) == 0) break; - udelay(1); + cpu_relax(); } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html