diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-06 13:11:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-09-06 13:11:45 +0000 |
commit | 28f3f511a7e17aa4f67b2fa6ca1b9cfc7ed9e8c8 (patch) | |
tree | 4d576323c3f98d87ddf08e24d54a25265791a0ea /c | |
parent | 2007-09-05 Daniel Hellstrom <daniel@gaisler.com> (diff) | |
download | rtems-28f3f511a7e17aa4f67b2fa6ca1b9cfc7ed9e8c8.tar.bz2 |
2007-09-06 Daniel Hellstrom <daniel@gaisler.com>
* console/debugputs.c: Now works on multi-CPU systems.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/ChangeLog | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/console/debugputs.c | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/ChangeLog b/c/src/lib/libbsp/sparc/leon3/ChangeLog index 73a10a0d81..6306c90f64 100644 --- a/c/src/lib/libbsp/sparc/leon3/ChangeLog +++ b/c/src/lib/libbsp/sparc/leon3/ChangeLog @@ -1,3 +1,7 @@ +2007-09-06 Daniel Hellstrom <daniel@gaisler.com> + + * console/debugputs.c: Now works on multi-CPU systems. + 2007-09-05 Daniel Hellstrom <daniel@gaisler.com> * clock/ckinit.c, console/console.c, leon_greth/leon_greth.c, diff --git a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c index af5b0370ea..b9cfeaef78 100644 --- a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c +++ b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c @@ -35,8 +35,9 @@ void console_outbyte_polled( { if ((port >= 0) && (port <= CONFIGURE_NUMBER_OF_TERMIOS_PORTS)) { - while ( (LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_THE) == 0 ); - LEON3_Console_Uart[port]->data = (unsigned int) ch; + while ( (LEON3_Console_Uart[LEON3_Cpu_Index+port]->status & + LEON_REG_UART_STATUS_THE) == 0 ); + LEON3_Console_Uart[LEON3_Cpu_Index+port]->data = (unsigned int) ch; } } @@ -52,13 +53,13 @@ int console_inbyte_nonblocking( int port ) if ((port >=0) && (port < CONFIGURE_NUMBER_OF_TERMIOS_PORTS)) { - if (LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_ERR) { - LEON3_Console_Uart[port]->status = ~LEON_REG_UART_STATUS_ERR; + if (LEON3_Console_Uart[LEON3_Cpu_Index+port]->status & LEON_REG_UART_STATUS_ERR) { + LEON3_Console_Uart[LEON3_Cpu_Index+port]->status = ~LEON_REG_UART_STATUS_ERR; } - if ((LEON3_Console_Uart[port]->status & LEON_REG_UART_STATUS_DR) == 0) + if ((LEON3_Console_Uart[LEON3_Cpu_Index+port]->status & LEON_REG_UART_STATUS_DR) == 0) return -1; - return (int) LEON3_Console_Uart[port]->data; + return (int) LEON3_Console_Uart[LEON3_Cpu_Index+port]->data; } else |