forked from Imagelibrary/rtems
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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user