2007-05-09 Joel Sherrill <joel.sherrill@OARcorp.com>

* console/debugputs.c, include/bsp.h, leon_smc91111/leon_smc91111.c,
	startup/bspstart.c, startup/spurious.c: Remove debug print methods
	that are redundant with prntk and replace their use with printk.
This commit is contained in:
Joel Sherrill
2007-05-09 17:49:58 +00:00
parent 94bbe85730
commit 55cb7c9474
6 changed files with 33 additions and 71 deletions

View File

@@ -1,3 +1,9 @@
2007-05-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* console/debugputs.c, include/bsp.h, leon_smc91111/leon_smc91111.c,
startup/bspstart.c, startup/spurious.c: Remove debug print methods
that are redundant with prntk and replace their use with printk.
2007-05-03 Joel Sherrill <joel@OARcorp.com>
* startup/linkcmds: Handle .data.* sections

View File

@@ -68,37 +68,3 @@ int console_inbyte_nonblocking( int port )
return -1;
}
/*
* DEBUG_puts
*
* This should be safe in the event of an error. It attempts to insure
* that no TX empty interrupts occur while it is doing polled IO. Then
* it restores the state of that external interrupt.
*
* Input parameters:
* string - pointer to debug output string
*
* Output parameters: NONE
*
* Return values: NONE
*/
void DEBUG_puts(
char *string
)
{
char *s;
/* uint32_t 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' );
sparc_enable_interrupts();
/* LEON_Restore_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
}

View File

@@ -116,8 +116,6 @@ rtems_isr_entry set_vector( /* returns old vector */
int type /* RTEMS or RAW intr */
);
void DEBUG_puts( char *string );
void BSP_fatal_return( void );
void bsp_spurious_initialize( void );

View File

@@ -75,15 +75,10 @@ int rtems_smc91111_driver_attach_leon3 (
if (addr_pio && addr_mctrl) {
LEON3_IOPORT_Regs_Map *io = (LEON3_IOPORT_Regs_Map *) addr_pio;
{
char buf[1024];
sprintf(buf,
"Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
(unsigned int)addr_pio,
(unsigned int)addr_mctrl);
DEBUG_puts(buf);
}
printk(
"Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
(unsigned int)addr_pio,
(unsigned int)addr_mctrl);
*((volatile unsigned int *)addr_mctrl) |= 0x10f80000; /*mctrl ctrl 1 */
io->irqmask |= (1 << leon_scmv91111_configuration.pio);

View File

@@ -108,7 +108,7 @@ void bsp_start( void )
(unsigned char *)rdb_start - BSP_Configuration.work_space_size;
if ( work_space_start <= (unsigned char *)&end ) {
DEBUG_puts( "bspstart: Not enough RAM!!!\n" );
printk( "bspstart: Not enough RAM!!!\n" );
BSP_fatal_return();
}

View File

@@ -52,11 +52,7 @@ rtems_isr bsp_spurious_handler(
real_trap = SPARC_REAL_TRAP_NUMBER(trap);
strcpy(line, "Unexpected trap (0x ) at address 0x ");
line[ 19 ] = digits[ real_trap >> 4 ];
line[ 20 ] = digits[ real_trap & 0xf ];
itos(isf->tpc, &line[36]);
DEBUG_puts( line );
printk( "Unexpected trap (0x%2d) at address 0x%08x\n", real_trap, isf->tpc);
switch (real_trap) {
@@ -65,33 +61,34 @@ rtems_isr bsp_spurious_handler(
*/
case 0x00:
DEBUG_puts( "reset" );
printk( "reset\n" );
break;
case 0x01:
DEBUG_puts( "instruction access exception" );
printk( "instruction access exception\n" );
break;
case 0x02:
DEBUG_puts( "illegal instruction" );
printk( "illegal instruction\n" );
break;
case 0x03:
DEBUG_puts( "privileged instruction" );
printk( "privileged instruction\n" );
break;
case 0x04:
DEBUG_puts( "fp disabled" );
printk( "fp disabled\n" );
break;
case 0x07:
DEBUG_puts( "memory address not aligned" );
printk( "memory address not aligned\n" );
break;
case 0x08:
DEBUG_puts( "fp exception" );
printk( "fp exception\n" );
break;
case 0x09:
strcpy(line, "data access exception at 0x " );
/* itos(LEON_REG.Failed_Address, &line[27]); FIXME */
DEBUG_puts( line );
printk( "Unexpected trap (0x%2d) at address 0x%08x\n",
real_trap,
abcdef01 /* XXX FIXME isf->tpc */
);
break;
case 0x0A:
DEBUG_puts( "tag overflow" );
printk( "tag overflow\n" );
break;
/*
@@ -101,31 +98,31 @@ rtems_isr bsp_spurious_handler(
/*
case LEON_TRAP_TYPE( LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR ):
DEBUG_puts( "LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR" );
printk( "LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_UART_2_RX_TX ):
DEBUG_puts( "LEON_INTERRUPT_UART_2_RX_TX" );
printk( "LEON_INTERRUPT_UART_2_RX_TX\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_UART_1_RX_TX ):
DEBUG_puts( "LEON_INTERRUPT_UART_1_RX_TX" );
printk( "LEON_INTERRUPT_UART_1_RX_TX\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_0 ):
DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_0" );
printk( "LEON_INTERRUPT_EXTERNAL_0\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_1 ):
DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_1" );
printk( "LEON_INTERRUPT_EXTERNAL_1\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_2 ):
DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_2" );
printk( "LEON_INTERRUPT_EXTERNAL_2\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_3 ):
DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_3" );
printk( "LEON_INTERRUPT_EXTERNAL_3\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER1 ):
DEBUG_puts( "LEON_INTERRUPT_TIMER1" );
printk( "LEON_INTERRUPT_TIMER1\n" );
break;
case LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER2 ):
DEBUG_puts( "LEON_INTERRUPT_TIMER2" );
printk( "LEON_INTERRUPT_TIMER2\n" );
break;
*/