2002-07-16 Eric Norum <eric.norum@usask.ca>

* comm/uart.c: I am using a PC-104 card with no video output.  I
	found that things would lock up if a printk was followed closely by
	a printf when BSPConsolePort = BSP_UART_COM2 and
	BSPPrintkPort = BSP_UART_COM1.  With this change in place,
	printf/printk calls can be intermingled with no apparent problems.
This commit is contained in:
Joel Sherrill
2002-07-16 22:30:11 +00:00
parent dc3848d0bc
commit 27ce64252d
2 changed files with 24 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
2002-07-16 Eric Norum <eric.norum@usask.ca>
* comm/uart.c: I am using a PC-104 card with no video output. I
found that things would lock up if a printk was followed closely by
a printf when BSPConsolePort = BSP_UART_COM2 and
BSPPrintkPort = BSP_UART_COM1. With this change in place,
printf/printk calls can be intermingled with no apparent problems.
2002-05-01 Eric Norum <eric.norum@usask.ca>
* console/console.c, fatal/bspfatal.c, startup/bspclean.c,

View File

@@ -387,6 +387,22 @@ BSP_uart_polled_write(int uart, int val)
uwrite(uart, THR, val & 0xff);
/*
* Wait for character to be transmitted.
* This ensures that printk and printf play nicely together
* when using the same serial port.
* Yes, there's a performance hit here, but if we're doing
* polled writes to a serial port we're probably not that
* interested in efficiency anyway.....
*/
for(;;)
{
if((val1=uread(uart, LSR)) & THRE)
{
break;
}
}
return;
}