Changeset 55cb7c9 in rtems


Ignore:
Timestamp:
May 9, 2007, 5:49:58 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
1ab18ec
Parents:
94bbe857
Message:

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

  • 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.
Location:
c/src/lib/libbsp/sparc/leon3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/ChangeLog

    r94bbe857 r55cb7c9  
     12007-05-09      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * console/debugputs.c, include/bsp.h, leon_smc91111/leon_smc91111.c,
     4        startup/bspstart.c, startup/spurious.c: Remove debug print methods
     5        that are redundant with prntk and replace their use with printk.
     6
    172007-05-03      Joel Sherrill <joel@OARcorp.com>
    28
  • c/src/lib/libbsp/sparc/leon3/console/debugputs.c

    r94bbe857 r55cb7c9  
    6969  return -1;
    7070}
    71 
    72 /*
    73  *  DEBUG_puts
    74  *
    75  *  This should be safe in the event of an error.  It attempts to insure
    76  *  that no TX empty interrupts occur while it is doing polled IO.  Then
    77  *  it restores the state of that external interrupt.
    78  *
    79  *  Input parameters:
    80  *    string  - pointer to debug output string
    81  *
    82  *  Output parameters:  NONE
    83  *
    84  *  Return values:      NONE
    85  */
    86 
    87 void DEBUG_puts(
    88   char *string
    89 )
    90 {
    91   char *s;
    92   /* uint32_t old_level; */
    93 
    94   /* LEON_Disable_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
    95   sparc_disable_interrupts();
    96   LEON3_Console_Uart[0]->ctrl = LEON_REG_UART_CTRL_TE;
    97     for ( s = string ; *s ; s++ )
    98       console_outbyte_polled( 0, *s );
    99 
    100     console_outbyte_polled( 0, '\r' );
    101     console_outbyte_polled( 0, '\n' );
    102   sparc_enable_interrupts(); 
    103     /* LEON_Restore_interrupt( LEON_INTERRUPT_UART_1_RX_TX, old_level ); */
    104 }
  • c/src/lib/libbsp/sparc/leon3/include/bsp.h

    r94bbe857 r55cb7c9  
    117117);
    118118
    119 void DEBUG_puts( char *string );
    120 
    121119void BSP_fatal_return( void );
    122120
  • c/src/lib/libbsp/sparc/leon3/leon_smc91111/leon_smc91111.c

    r94bbe857 r55cb7c9  
    7676     
    7777      LEON3_IOPORT_Regs_Map *io = (LEON3_IOPORT_Regs_Map *) addr_pio;
    78       {
    79         char buf[1024];
    80        
    81         sprintf(buf,
    82           "Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
    83           (unsigned int)addr_pio,
    84           (unsigned int)addr_mctrl);
    85         DEBUG_puts(buf);
    86       }
     78      printk(
     79        "Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
     80        (unsigned int)addr_pio,
     81        (unsigned int)addr_mctrl);
    8782     
    8883      *((volatile unsigned int *)addr_mctrl) |= 0x10f80000;  /*mctrl ctrl 1 */
  • c/src/lib/libbsp/sparc/leon3/startup/bspstart.c

    r94bbe857 r55cb7c9  
    109109
    110110  if ( work_space_start <= (unsigned char *)&end ) {
    111     DEBUG_puts( "bspstart: Not enough RAM!!!\n" );
     111    printk( "bspstart: Not enough RAM!!!\n" );
    112112    BSP_fatal_return();
    113113  }
  • c/src/lib/libbsp/sparc/leon3/startup/spurious.c

    r94bbe857 r55cb7c9  
    5353  real_trap = SPARC_REAL_TRAP_NUMBER(trap);
    5454
    55   strcpy(line, "Unexpected trap (0x  ) at address 0x        ");
    56   line[ 19 ] = digits[ real_trap >> 4 ];
    57   line[ 20 ] = digits[ real_trap & 0xf ];
    58   itos(isf->tpc, &line[36]);
    59   DEBUG_puts( line );
     55  printk( "Unexpected trap (0x%2d) at address 0x%08x\n", real_trap, isf->tpc);
    6056
    6157  switch (real_trap) {
     
    6662
    6763    case 0x00:
    68       DEBUG_puts( "reset" );
     64      printk( "reset\n" );
    6965      break;
    7066    case 0x01:
    71       DEBUG_puts( "instruction access exception" );
     67      printk( "instruction access exception\n" );
    7268      break;
    7369    case 0x02:
    74       DEBUG_puts( "illegal instruction" );
     70      printk( "illegal instruction\n" );
    7571      break;
    7672    case 0x03:
    77       DEBUG_puts( "privileged instruction" );
     73      printk( "privileged instruction\n" );
    7874      break;
    7975    case 0x04:
    80       DEBUG_puts( "fp disabled" );
     76      printk( "fp disabled\n" );
    8177      break;
    8278    case 0x07:
    83       DEBUG_puts( "memory address not aligned" );
     79      printk( "memory address not aligned\n" );
    8480      break;
    8581    case 0x08:
    86       DEBUG_puts( "fp exception" );
     82      printk( "fp exception\n" );
    8783      break;
    8884    case 0x09:
    89       strcpy(line, "data access exception at 0x        " );
    90       /* itos(LEON_REG.Failed_Address, &line[27]);  FIXME */
    91       DEBUG_puts( line );
     85      printk( "Unexpected trap (0x%2d) at address 0x%08x\n",
     86        real_trap,
     87        abcdef01 /* XXX FIXME isf->tpc */
     88      );
    9289      break;
    9390    case 0x0A:
    94       DEBUG_puts( "tag overflow" );
     91      printk( "tag overflow\n" );
    9592      break;
    9693
     
    10299      /*
    103100    case LEON_TRAP_TYPE( LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR ):
    104       DEBUG_puts( "LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR" );
     101      printk( "LEON_INTERRUPT_CORRECTABLE_MEMORY_ERROR\n" );
    105102      break;
    106103    case LEON_TRAP_TYPE( LEON_INTERRUPT_UART_2_RX_TX ):
    107       DEBUG_puts( "LEON_INTERRUPT_UART_2_RX_TX" );
     104      printk( "LEON_INTERRUPT_UART_2_RX_TX\n" );
    108105      break;
    109106    case LEON_TRAP_TYPE( LEON_INTERRUPT_UART_1_RX_TX ):
    110       DEBUG_puts( "LEON_INTERRUPT_UART_1_RX_TX" );
     107      printk( "LEON_INTERRUPT_UART_1_RX_TX\n" );
    111108      break;
    112109    case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_0 ):
    113       DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_0" );
     110      printk( "LEON_INTERRUPT_EXTERNAL_0\n" );
    114111      break;
    115112    case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_1 ):
    116       DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_1" );
     113      printk( "LEON_INTERRUPT_EXTERNAL_1\n" );
    117114      break;
    118115    case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_2 ):
    119       DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_2" );
     116      printk( "LEON_INTERRUPT_EXTERNAL_2\n" );
    120117      break;
    121118    case LEON_TRAP_TYPE( LEON_INTERRUPT_EXTERNAL_3 ):
    122       DEBUG_puts( "LEON_INTERRUPT_EXTERNAL_3" );
     119      printk( "LEON_INTERRUPT_EXTERNAL_3\n" );
    123120      break;
    124121    case LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER1 ):
    125       DEBUG_puts( "LEON_INTERRUPT_TIMER1" );
     122      printk( "LEON_INTERRUPT_TIMER1\n" );
    126123      break;
    127124    case LEON_TRAP_TYPE( LEON_INTERRUPT_TIMER2 ):
    128       DEBUG_puts( "LEON_INTERRUPT_TIMER2" );
     125      printk( "LEON_INTERRUPT_TIMER2\n" );
    129126      break;
    130127      */
Note: See TracChangeset for help on using the changeset viewer.