forked from Imagelibrary/rtems
2007-09-17 Joel Sherrill <joel.sherrill@OARcorp.com>
* PCI_bus/universe.c, console/console.c, include/bsp.h, irq/FPGA.c, startup/bspstart.c, startup/genpvec.c, startup/spurious.c: Eliminate DEBUG_puts.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2007-09-17 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* PCI_bus/universe.c, console/console.c, include/bsp.h, irq/FPGA.c,
|
||||
startup/bspstart.c, startup/genpvec.c, startup/spurious.c: Eliminate
|
||||
DEBUG_puts.
|
||||
|
||||
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
PR 1257/bsps
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <rtems.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include "PCI.h"
|
||||
@@ -175,7 +177,7 @@ void initialize_universe()
|
||||
* compare to known ID
|
||||
*/
|
||||
if (pci_id != SCORE603E_UNIVERSE_CHIP_ID ){
|
||||
DEBUG_puts ("Invalid SCORE603E_UNIVERSE_CHIP_ID: ");
|
||||
printk ("Invalid SCORE603E_UNIVERSE_CHIP_ID: 0x08%" PRId32 "\n", pci_id);
|
||||
rtems_fatal_error_occurred( 0x603e0bad );
|
||||
}
|
||||
|
||||
|
||||
@@ -60,45 +60,6 @@ int USE_FOR_CONSOLE = USE_FOR_CONSOLE_DEF;
|
||||
* Console Device Driver Entry Points
|
||||
*/
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* 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;
|
||||
int console;
|
||||
volatile uint8_t *csr;
|
||||
|
||||
console = USE_FOR_CONSOLE;
|
||||
|
||||
csr = Ports_85C30[ console ].ctrl;
|
||||
|
||||
/* should disable interrupts here */
|
||||
|
||||
for ( s = string ; *s ; s++ )
|
||||
outbyte_polled_85c30( csr, *s );
|
||||
|
||||
outbyte_polled_85c30( csr, '\r' );
|
||||
outbyte_polled_85c30( csr, '\n' );
|
||||
|
||||
/* should enable interrupts here */
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* console_inbyte_nonblocking
|
||||
|
||||
@@ -152,8 +152,6 @@ void initialize_external_exception_vector ();
|
||||
/*
|
||||
* console.c
|
||||
*/
|
||||
void DEBUG_puts( char *string );
|
||||
|
||||
void BSP_fatal_return( void );
|
||||
|
||||
/*
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <rtems/libio.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
/*
|
||||
* initialize FPGA
|
||||
@@ -154,7 +155,7 @@ uint16_t read_and_clear_irq()
|
||||
irq = (*SCORE603E_FPGA_VECT_DATA);
|
||||
|
||||
if ((irq & 0xffff0) != 0x10) {
|
||||
DEBUG_puts( "ERROR:: no irq data\n");
|
||||
printk( "ERROR:: no irq data\n");
|
||||
return (irq | 0x80);
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ void bsp_start( void )
|
||||
(unsigned char *)&RAM_END - 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_cleanup();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/chain.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdio.h> /* for sprintf */
|
||||
@@ -139,7 +140,6 @@ rtems_isr external_exception_ISR (
|
||||
uint16_t index;
|
||||
EE_ISR_Type *node;
|
||||
uint16_t value;
|
||||
char err_msg[100];
|
||||
#if (HAS_PMC_PSC8)
|
||||
uint16_t PMC_irq;
|
||||
uint16_t check_irq;
|
||||
@@ -148,8 +148,7 @@ rtems_isr external_exception_ISR (
|
||||
|
||||
index = read_and_clear_irq();
|
||||
if ( index >= NUM_LIRQ ) {
|
||||
sprintf( err_msg, "ERROR:: Invalid interrupt number (%02x)\n", index );
|
||||
DEBUG_puts( err_msg );
|
||||
printk( "ERROR:: Invalid interrupt number (%02x)\n", index );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -165,12 +164,9 @@ rtems_isr external_exception_ISR (
|
||||
node = (EE_ISR_Type *)(ISR_Array[ index ].first);
|
||||
|
||||
if ( _Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
|
||||
sprintf(err_msg,"ERROR:: check %d interrupt %02d has no isr\n",
|
||||
check_irq, index);
|
||||
DEBUG_puts( err_msg);
|
||||
printk"ERROR:: check %d interrupt %02d has no isr\n", check_irq, index);
|
||||
value = get_irq_mask();
|
||||
sprintf(err_msg," Mask = %02x\n", value);
|
||||
DEBUG_puts( err_msg);
|
||||
printk(" Mask = %02x\n", value);
|
||||
}
|
||||
while ( !_Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
|
||||
(*node->handler)( node->vector );
|
||||
@@ -184,11 +180,9 @@ rtems_isr external_exception_ISR (
|
||||
{
|
||||
node = (EE_ISR_Type *)(ISR_Array[ index ].first);
|
||||
if ( _Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
|
||||
sprintf(err_msg,"ERROR:: interrupt %02x has no isr\n", index);
|
||||
DEBUG_puts( err_msg);
|
||||
printk( "ERROR:: interrupt %02x has no isr\n", index);
|
||||
value = get_irq_mask();
|
||||
sprintf(err_msg," Mask = %02x\n", value);
|
||||
DEBUG_puts( err_msg);
|
||||
printk(" Mask = %02x\n", value);
|
||||
return;
|
||||
}
|
||||
while ( !_Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -37,101 +38,101 @@ rtems_isr bsp_spurious_handler(
|
||||
|
||||
switch ( trap ) {
|
||||
case PPC_IRQ_SYSTEM_RESET:
|
||||
DEBUG_puts( "\nTrap: System reset" );
|
||||
printk( "\nTrap: System reset\n" );
|
||||
break;
|
||||
case PPC_IRQ_MCHECK:
|
||||
DEBUG_puts( "\nTrap: Machine check" );
|
||||
printk( "\nTrap: Machine check\n" );
|
||||
break;
|
||||
case PPC_IRQ_PROTECT:
|
||||
DEBUG_puts( "\nTrap: DSI" );
|
||||
printk( "\nTrap: DSI\n" );
|
||||
break;
|
||||
case PPC_IRQ_ISI:
|
||||
DEBUG_puts( "ISI" );
|
||||
printk( "ISI\n" );
|
||||
break;
|
||||
case PPC_IRQ_EXTERNAL:
|
||||
DEBUG_puts( "\nTrap: External interupt" );
|
||||
printk( "\nTrap: External interupt\n" );
|
||||
break;
|
||||
case PPC_IRQ_ALIGNMENT:
|
||||
DEBUG_puts( "\nTrap: Alignment Exception" );
|
||||
printk( "\nTrap: Alignment Exception\n" );
|
||||
break;
|
||||
case PPC_IRQ_PROGRAM:
|
||||
DEBUG_puts( "\nTrap: Program" );
|
||||
printk( "\nTrap: Program\n" );
|
||||
break;
|
||||
case PPC_IRQ_NOFP:
|
||||
DEBUG_puts( "\nTrap: Floating point unavailable" );
|
||||
printk( "\nTrap: Floating point unavailable\n" );
|
||||
break;
|
||||
case PPC_IRQ_DECREMENTER:
|
||||
DEBUG_puts( "\nTrap: Decrementer" );
|
||||
printk( "\nTrap: Decrementer\n" );
|
||||
break;
|
||||
case PPC_IRQ_RESERVED_A:
|
||||
DEBUG_puts( "\nTrap: Reserved 0x00a00" );
|
||||
printk( "\nTrap: Reserved 0x00a00\n" );
|
||||
break;
|
||||
case PPC_IRQ_RESERVED_B:
|
||||
DEBUG_puts( "\nTrap: Reserved 0x00b00" );
|
||||
printk( "\nTrap: Reserved 0x00b00\n" );
|
||||
break;
|
||||
case PPC_IRQ_SCALL:
|
||||
DEBUG_puts( "\nTrap: System call" );
|
||||
printk( "\nTrap: System call\n" );
|
||||
break;
|
||||
case PPC_IRQ_TRACE:
|
||||
DEBUG_puts( "\nTrap: Trace" );
|
||||
printk( "\nTrap: Trace\n" );
|
||||
break;
|
||||
case PPC_IRQ_FP_ASST:
|
||||
DEBUG_puts( "\nTrap: Floating point Assist" );
|
||||
printk( "\nTrap: Floating point Assist\n" );
|
||||
break;
|
||||
|
||||
#if defined(ppc403)
|
||||
#error "Please fill in names. "
|
||||
case PPC_IRQ_CRIT :
|
||||
DEBUG_puts( "\nTrap: Critical Error ");
|
||||
printk( "\nTrap: Critical Error\n ");
|
||||
break;
|
||||
case PPC_IRQ_PIT:
|
||||
DEBUG_puts( "\nTrap: 0x01000" );
|
||||
printk( "\nTrap: 0x01000\n" );
|
||||
break;
|
||||
case PPC_IRQ_FIT:
|
||||
DEBUG_puts( "\nTrap: 0x01010" );
|
||||
printk( "\nTrap: 0x01010\n" );
|
||||
break;
|
||||
case PPC_IRQ_WATCHDOG :
|
||||
DEBUG_puts( "\nTrap: 0x01020" );
|
||||
printk( "\nTrap: 0x01020\n" );
|
||||
break;
|
||||
case PPC_IRQ_DEBUG :
|
||||
DEBUG_puts( "\nTrap: 0x02000" );
|
||||
printk( "\nTrap: 0x02000\n" );
|
||||
break;
|
||||
|
||||
#elif defined(ppc601)
|
||||
#error "Please fill in names. "
|
||||
case PPC_IRQ_TRACE :
|
||||
DEBUG_puts( "\nTrap: 0x02000" );
|
||||
printk( "\nTrap: 0x02000\n" );
|
||||
break;
|
||||
|
||||
#elif defined(ppc603) || defined(ppc603e)
|
||||
case PPC_IRQ_TRANS_MISS:
|
||||
DEBUG_puts( "\nTrap: Instruction Translation Miss" );
|
||||
printk( "\nTrap: Instruction Translation Miss\n" );
|
||||
break;
|
||||
case PPC_IRQ_DATA_LOAD:
|
||||
DEBUG_puts( "\nTrap: Data Load Translation Miss" );
|
||||
printk( "\nTrap: Data Load Translation Miss\n" );
|
||||
break;
|
||||
case PPC_IRQ_DATA_STORE:
|
||||
DEBUG_puts( "\nTrap: Data store Translation Miss");
|
||||
printk( "\nTrap: Data store Translation Mis\ns");
|
||||
break;
|
||||
case PPC_IRQ_ADDR_BRK:
|
||||
DEBUG_puts( "\nTrap: Instruction address break point" );
|
||||
printk( "\nTrap: Instruction address break point\n" );
|
||||
break;
|
||||
case PPC_IRQ_SYS_MGT:
|
||||
DEBUG_puts( "\nTrap: System management interrupt" );
|
||||
printk( "\nTrap: System management interrupt\n" );
|
||||
break;
|
||||
|
||||
#elif defined(mpc604)
|
||||
#error "Please fill in names. "
|
||||
case PPC_IRQ_ADDR_BRK:
|
||||
DEBUG_puts( "0x1300" );
|
||||
printk( "0x1300\n" );
|
||||
break;
|
||||
case PPC_IRQ_SYS_MGT:
|
||||
DEBUG_puts( "0x1400" );
|
||||
printk( "0x1400\n" );
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
DEBUG_puts( "\nTrap: Undefined exception " );
|
||||
printk( "\nTrap: Undefined exception\n" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user