summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-04-24 16:58:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-04-24 16:58:41 +0000
commitcadb5d1641059adb5bbef5900e2cefee653f2b74 (patch)
tree6353a9fe2f02c1b89b69e6cf55eef27d24710ce7 /c/src/lib/libbsp/sparc/leon3/console/debugputs.c
parent2006-04-24 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-cadb5d1641059adb5bbef5900e2cefee653f2b74.tar.bz2
2006-04-24 Jiri Gaisler <jiri@gaisler.com>
Edvin Catovic <edvin@gaisler.com> PR bsps/972 * ChangeLog, Makefile.am, configure.ac, amba/amba.c, clock/ckinit.c, console/Makefile.am, console/console.c, console/debugputs.c, include/Makefile.am, include/amba.h, include/bsp.h, include/leon.h, leon_smc91111/leon_smc91111.c, startup/bspstart.c, timer/timer.c, tools/Makefile.am, wrapup/Makefile.am: Added Shared Memory Support Driver. Added Leon Gaisler Research Ethernet support. Enhanced AMBA bus support. * console/debugprintf.c, console/spacewire.c, include/spacewire.h, leon_greth/.cvsignore, leon_greth/Makefile.am, leon_greth/leon_greth.c, shmsupp/.cvsignore, shmsupp/Makefile.am, shmsupp/addrconv.c, shmsupp/getcfg.c, shmsupp/lock.c, shmsupp/mpisr.c: New files.
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/console/debugputs.c')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/console/debugputs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
index 066a584386..7e3ea655d9 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
@@ -35,8 +35,8 @@ 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 +52,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
@@ -90,15 +90,15 @@ void DEBUG_puts(
{
char *s;
/* unsigned32 old_level; */
-
+
/* LEON_Disable_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
sparc_disable_interrupts();
LEON3_Console_Uart[0]->ctrl = LEON_REG_UART_CTRL_TE;
- for ( s = string ; *s ; s++ )
- console_outbyte_polled( 0, *s );
-
- console_outbyte_polled( 0, '\r' );
- console_outbyte_polled( 0, '\n' );
+ for ( s = string ; *s ; s++ )
+ console_outbyte_polled( 0, *s );
+
+ console_outbyte_polled( 0, '\r' );
+ console_outbyte_polled( 0, '\n' );
sparc_enable_interrupts();
- /* LEON_Restore_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
+ /* LEON_Restore_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
}