Changeset 50f93fb in rtems


Ignore:
Timestamp:
Sep 17, 2007, 2:09:43 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
b00e693
Parents:
76e552d3
Message:

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

  • 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.
Location:
c/src/lib/libbsp/powerpc/score603e
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/score603e/ChangeLog

    r76e552d3 r50f93fb  
     12007-09-17      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * PCI_bus/universe.c, console/console.c, include/bsp.h, irq/FPGA.c,
     4        startup/bspstart.c, startup/genpvec.c, startup/spurious.c: Eliminate
     5        DEBUG_puts.
     6
    172007-09-12      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • c/src/lib/libbsp/powerpc/score603e/PCI_bus/universe.c

    r76e552d3 r50f93fb  
    1010#include <assert.h>
    1111#include <stdio.h>
     12#include <inttypes.h>
     13#include <rtems/bspIo.h>
    1214
    1315#include <bsp.h>
     
    176178    */
    177179   if (pci_id !=  SCORE603E_UNIVERSE_CHIP_ID ){
    178      DEBUG_puts ("Invalid SCORE603E_UNIVERSE_CHIP_ID: ");
     180     printk ("Invalid SCORE603E_UNIVERSE_CHIP_ID: 0x08%" PRId32 "\n", pci_id);
    179181     rtems_fatal_error_occurred( 0x603e0bad );
    180182   }
  • c/src/lib/libbsp/powerpc/score603e/console/console.c

    r76e552d3 r50f93fb  
    6060 *  Console Device Driver Entry Points
    6161 */
    62 
    63 /* PAGE
    64  *
    65  *  DEBUG_puts
    66  *
    67  *  This should be safe in the event of an error.  It attempts to insure
    68  *  that no TX empty interrupts occur while it is doing polled IO.  Then
    69  *  it restores the state of that external interrupt.
    70  *
    71  *  Input parameters:
    72  *    string  - pointer to debug output string
    73  *
    74  *  Output parameters:  NONE
    75  *
    76  *  Return values:      NONE
    77  */
    78 
    79 void DEBUG_puts(
    80   char *string
    81 )
    82 {
    83   char *s;
    84   int   console;
    85   volatile uint8_t         *csr;
    86 
    87   console = USE_FOR_CONSOLE;
    88 
    89   csr = Ports_85C30[ console ].ctrl;
    90 
    91   /* should disable interrupts here */
    92 
    93   for ( s = string ; *s ; s++ )
    94     outbyte_polled_85c30( csr, *s );
    95 
    96   outbyte_polled_85c30( csr, '\r' );
    97   outbyte_polled_85c30( csr, '\n' );
    98 
    99   /* should enable interrupts here */
    100 }
    10162
    10263/* PAGE
  • c/src/lib/libbsp/powerpc/score603e/include/bsp.h

    r76e552d3 r50f93fb  
    153153 * console.c
    154154 */
    155 void DEBUG_puts( char *string );
    156 
    157155void BSP_fatal_return( void );
    158156
  • c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c

    r76e552d3 r50f93fb  
    1818#include <rtems/libio.h>
    1919#include <rtems/libcsupport.h>
     20#include <rtems/bspIo.h>
    2021
    2122/*
     
    155156
    156157  if ((irq & 0xffff0) != 0x10) {
    157     DEBUG_puts( "ERROR:: no irq data\n");
     158    printk( "ERROR:: no irq data\n");
    158159    return (irq | 0x80);
    159160  }
  • c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c

    r76e552d3 r50f93fb  
    298298
    299299  if ( work_space_start <= (unsigned char *)&end ) {
    300     DEBUG_puts( "bspstart: Not enough RAM!!!\n" );
     300    printk( "bspstart: Not enough RAM!!!\n" );
    301301    bsp_cleanup();
    302302  }
  • c/src/lib/libbsp/powerpc/score603e/startup/genpvec.c

    r76e552d3 r50f93fb  
    1616#include <bsp.h>
    1717#include <rtems/chain.h>
     18#include <rtems/bspIo.h>
    1819#include <assert.h>
    1920
     
    140141 EE_ISR_Type         *node;
    141142 uint16_t            value;
    142  char                err_msg[100];
    143143#if (HAS_PMC_PSC8)
    144144 uint16_t            PMC_irq;
     
    149149 index = read_and_clear_irq();
    150150 if ( index >= NUM_LIRQ ) {
    151    sprintf( err_msg, "ERROR:: Invalid interrupt number (%02x)\n", index );
    152    DEBUG_puts( err_msg );
     151   printk( "ERROR:: Invalid interrupt number (%02x)\n", index );
    153152   return;
    154153 }
     
    166165
    167166        if ( _Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
    168           sprintf(err_msg,"ERROR:: check %d interrupt %02d has no isr\n",
    169                   check_irq, index);
    170           DEBUG_puts( err_msg);
     167          printk"ERROR:: check %d interrupt %02d has no isr\n", check_irq, index);
    171168          value = get_irq_mask();
    172           sprintf(err_msg,"        Mask = %02x\n", value);
    173           DEBUG_puts( err_msg);
     169          printk("        Mask = %02x\n", value);
    174170        }
    175171        while ( !_Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
     
    185181    node = (EE_ISR_Type *)(ISR_Array[ index ].first);
    186182    if ( _Chain_Is_tail( &ISR_Array[ index ], (void *)node ) ) {
    187       sprintf(err_msg,"ERROR:: interrupt %02x has no isr\n", index);
    188       DEBUG_puts( err_msg);
     183      printk( "ERROR:: interrupt %02x has no isr\n", index);
    189184      value = get_irq_mask();
    190       sprintf(err_msg,"        Mask = %02x\n", value);
    191       DEBUG_puts( err_msg);
     185      printk("        Mask = %02x\n", value);
    192186      return;
    193187    }
  • c/src/lib/libbsp/powerpc/score603e/startup/spurious.c

    r76e552d3 r50f93fb  
    1717
    1818#include <bsp.h>
     19#include <rtems/bspIo.h>
    1920
    2021#include <string.h>
     
    3839  switch ( trap ) {
    3940    case PPC_IRQ_SYSTEM_RESET:
    40       DEBUG_puts( "\nTrap: System reset" );
     41      printk( "\nTrap: System reset\n" );
    4142      break;
    4243    case PPC_IRQ_MCHECK:
    43       DEBUG_puts( "\nTrap: Machine check" );
     44      printk( "\nTrap: Machine check\n" );
    4445      break;
    4546    case PPC_IRQ_PROTECT:
    46       DEBUG_puts( "\nTrap: DSI" );
     47      printk( "\nTrap: DSI\n" );
    4748      break;
    4849    case PPC_IRQ_ISI:
    49       DEBUG_puts( "ISI" );
     50      printk( "ISI\n" );
    5051      break;
    5152    case PPC_IRQ_EXTERNAL:
    52       DEBUG_puts( "\nTrap: External interupt" );
     53      printk( "\nTrap: External interupt\n" );
    5354      break;
    5455    case PPC_IRQ_ALIGNMENT:
    55       DEBUG_puts( "\nTrap: Alignment Exception" );
     56      printk( "\nTrap: Alignment Exception\n" );
    5657      break;
    5758    case PPC_IRQ_PROGRAM:
    58       DEBUG_puts( "\nTrap: Program" );
     59      printk( "\nTrap: Program\n" );
    5960      break;
    6061    case PPC_IRQ_NOFP:
    61       DEBUG_puts( "\nTrap: Floating point unavailable" );
     62      printk( "\nTrap: Floating point unavailable\n" );
    6263      break;
    6364    case PPC_IRQ_DECREMENTER:
    64       DEBUG_puts( "\nTrap: Decrementer" );
     65      printk( "\nTrap: Decrementer\n" );
    6566      break;
    6667    case PPC_IRQ_RESERVED_A:
    67       DEBUG_puts( "\nTrap: Reserved 0x00a00" );
     68      printk( "\nTrap: Reserved 0x00a00\n" );
    6869      break;
    6970    case PPC_IRQ_RESERVED_B:
    70       DEBUG_puts( "\nTrap: Reserved 0x00b00" );
     71      printk( "\nTrap: Reserved 0x00b00\n" );
    7172      break;
    7273    case PPC_IRQ_SCALL:
    73       DEBUG_puts( "\nTrap: System call" );
     74      printk( "\nTrap: System call\n" );
    7475      break;
    7576    case PPC_IRQ_TRACE:
    76       DEBUG_puts( "\nTrap: Trace" );
     77      printk( "\nTrap: Trace\n" );
    7778      break;
    7879    case PPC_IRQ_FP_ASST:
    79       DEBUG_puts( "\nTrap: Floating point Assist" );
     80      printk( "\nTrap: Floating point Assist\n" );
    8081      break;
    8182
     
    8384#error "Please fill in names. "
    8485    case PPC_IRQ_CRIT :
    85       DEBUG_puts( "\nTrap: Critical Error ");
     86      printk( "\nTrap: Critical Error\n ");
    8687      break;
    8788    case PPC_IRQ_PIT:
    88       DEBUG_puts( "\nTrap: 0x01000" );
     89      printk( "\nTrap: 0x01000\n" );
    8990      break;
    9091    case PPC_IRQ_FIT:
    91       DEBUG_puts( "\nTrap: 0x01010" );
     92      printk( "\nTrap: 0x01010\n" );
    9293      break;
    9394    case PPC_IRQ_WATCHDOG :
    94       DEBUG_puts( "\nTrap: 0x01020" );
     95      printk( "\nTrap: 0x01020\n" );
    9596      break;
    9697    case PPC_IRQ_DEBUG   :
    97       DEBUG_puts( "\nTrap: 0x02000" );
     98      printk( "\nTrap: 0x02000\n" );
    9899      break;
    99100
     
    101102#error "Please fill in names. "
    102103    case PPC_IRQ_TRACE    :
    103       DEBUG_puts( "\nTrap: 0x02000" );
     104      printk( "\nTrap: 0x02000\n" );
    104105      break;
    105106
    106107#elif defined(ppc603) || defined(ppc603e)
    107108    case PPC_IRQ_TRANS_MISS:
    108       DEBUG_puts( "\nTrap: Instruction Translation Miss" );
     109      printk( "\nTrap: Instruction Translation Miss\n" );
    109110      break;
    110111    case PPC_IRQ_DATA_LOAD:
    111       DEBUG_puts( "\nTrap: Data Load Translation Miss" );
     112      printk( "\nTrap: Data Load Translation Miss\n" );
    112113      break;
    113114    case PPC_IRQ_DATA_STORE:
    114       DEBUG_puts( "\nTrap: Data store Translation Miss");
     115      printk( "\nTrap: Data store Translation Mis\ns");
    115116      break;
    116117    case PPC_IRQ_ADDR_BRK:
    117       DEBUG_puts( "\nTrap: Instruction address break point" );
     118      printk( "\nTrap: Instruction address break point\n" );
    118119      break;
    119120    case PPC_IRQ_SYS_MGT:
    120       DEBUG_puts( "\nTrap: System management interrupt" );
     121      printk( "\nTrap: System management interrupt\n" );
    121122      break;
    122123
     
    124125#error "Please fill in names. "
    125126    case PPC_IRQ_ADDR_BRK:
    126       DEBUG_puts( "0x1300" );
     127      printk( "0x1300\n" );
    127128      break;
    128129    case PPC_IRQ_SYS_MGT:
    129       DEBUG_puts( "0x1400" );
     130      printk( "0x1400\n" );
    130131      break;
    131132#endif
    132133
    133134  default:
    134      DEBUG_puts( "\nTrap: Undefined exception " );
     135     printk( "\nTrap: Undefined exception\n" );
    135136     break;
    136137  }
Note: See TracChangeset for help on using the changeset viewer.