diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-21 10:43:04 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2004-04-21 10:43:04 +0000 |
commit | 6128a4aa5e791ed4e0a655bfd346a52d92da7883 (patch) | |
tree | af53ca3f67ce405b6fbc6c98399c8e0c87e01a9e /c/src/lib/libbsp/m68k/mvme167 | |
parent | 2004-04-20 Ralf Corsepius <ralf_corsepius@rtems.org> (diff) | |
download | rtems-6128a4aa5e791ed4e0a655bfd346a52d92da7883.tar.bz2 |
Remove stray white spaces.
Diffstat (limited to 'c/src/lib/libbsp/m68k/mvme167')
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c | 26 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/console/console-recording.h | 48 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/console/console.c | 82 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c | 34 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/include/bsp.h | 12 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/include/fatal.h | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/include/page_table.h | 18 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/network/network.c | 302 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/network/uti596.h | 30 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c | 18 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/startup/page_table.c | 20 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme167/timer/timer.c | 6 |
13 files changed, 301 insertions, 301 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c b/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c index f152900e0a..b2576028d8 100644 --- a/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c +++ b/c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c @@ -25,7 +25,7 @@ * * $Id$ */ - + #include <stdlib.h> #include <bsp.h> #include <rtems/libio.h> @@ -59,7 +59,7 @@ rtems_device_minor_number rtems_clock_minor; volatile uint32_t Clock_driver_ticks; -/* +/* * Clock_isrs is the number of clock ISRs until the next invocation of the * RTEMS clock tick routine. This clock tick device driver gets an interrupt * once a millisecond and counts down until the length of time between the @@ -104,16 +104,16 @@ rtems_isr VMEchip2_T2_isr( char overflow; /* Content of overflow counter */ long i; long ct; /* Number of T2 ticks per RTEMS ticks */ - + ct = BSP_Configuration.microseconds_per_tick / 1000; - + /* * May have missed interrupts, so should look at the overflow counter. */ lcsr->intr_clear |= 0x02000000; /* Clear the interrupt */ overflow = (lcsr->board_ctl >> 12) & 0xF; lcsr->board_ctl |= 0x400; /* Reset overflow counter */ - + /* Attempt to protect against one more period */ if ( overflow == 0 ) overflow = 16; @@ -128,7 +128,7 @@ rtems_isr VMEchip2_T2_isr( /* Reset the counter */ Clock_isrs = (uint32_t)-i; } - else + else Clock_isrs -= overflow; } @@ -138,7 +138,7 @@ rtems_isr VMEchip2_T2_isr( * * Initialize the VMEchip2 Tick Timer #2. * - * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET! + * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET! * The prescaler is used by all VMEchip2 timers, including the VMEbus grant * timeout counter, the DMAC time off timer, the DMAC timer on timer, and the * VMEbus global timeout timer. The prescaler value is normally set by the @@ -211,7 +211,7 @@ void clock_exit( void ) * * Return values: * rtems_device_driver status code - */ + */ rtems_device_driver Clock_initialize( rtems_device_major_number major, rtems_device_minor_number minor, @@ -219,13 +219,13 @@ rtems_device_driver Clock_initialize( ) { VMEchip2_T2_initialize(); - + /* * Make major/minor avail to others such as shared memory driver */ rtems_clock_major = major; rtems_clock_minor = minor; - + return RTEMS_SUCCESSFUL; } @@ -251,10 +251,10 @@ rtems_device_driver Clock_control( { uint32_t isrlevel; rtems_libio_ioctl_args_t *args = pargp; - + if ( args == 0 ) goto done; - + /* * This is hokey, but until we get a defined interface * to do this, it will just be this simple... @@ -269,7 +269,7 @@ rtems_device_driver Clock_control( set_vector( args->buffer, CLOCK_VECTOR, 1 ); rtems_interrupt_enable( isrlevel ); } - + done: return RTEMS_SUCCESSFUL; } diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h index 81ea4461a9..9aa0d597b8 100644 --- a/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h +++ b/c/src/lib/libbsp/m68k/mvme167/console/console-recording.h @@ -5,7 +5,7 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. */ - + /* CD2401 CONSOLE DRIVER DEBUG INFO RECORDING */ #ifdef CD2401_RECORD_DEBUG_INFO @@ -243,8 +243,8 @@ int cd2401_get_record_size( /* Not the best way to do this */ return size + 4; } - - + + void cd2401_record_write_info( int len, const char * buf, @@ -252,9 +252,9 @@ void cd2401_record_write_info( ) { int max_length; - + max_length = (len < CD2401_DEBUG_CHAR_BUFSIZE ) ? len : CD2401_DEBUG_CHAR_BUFSIZE; - + memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) ); cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_WRITE_INFO; cd2401_debug_buffer[cd2401_debug_index].record_size = @@ -262,7 +262,7 @@ void cd2401_record_write_info( cd2401_debug_buffer[cd2401_debug_index].u.write_info.length = len; memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.write_info.buffer), buf, max_length ); cd2401_debug_buffer[cd2401_debug_index].u.write_info.dmabuf = dmabuf; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -274,7 +274,7 @@ void cd2401_record_tx_isr_info( unsigned char final_ier, uint8_t txEmpty ) -{ +{ memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) ); cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_TX_ISR_INFO; cd2401_debug_buffer[cd2401_debug_index].record_size = @@ -284,7 +284,7 @@ void cd2401_record_tx_isr_info( cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.initial_ier = initial_ier; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.final_ier = final_ier; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_info.txEmpty = txEmpty; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -308,7 +308,7 @@ void cd2401_record_tx_isr_spurious_info( cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.final_ier = final_ier; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurdev = spur_dev; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_spurious_info.spurcount = spur_cnt; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -332,7 +332,7 @@ void cd2401_record_tx_isr_buserr_info( cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.buserr = buserr; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.type = buserr_type; cd2401_debug_buffer[cd2401_debug_index].u.tx_isr_buserr_info.addr = buserr_addr; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -344,16 +344,16 @@ void cd2401_record_rx_isr_info( ) { int max_length; - + max_length = (total < CD2401_DEBUG_CHAR_BUFSIZE ) ? total : CD2401_DEBUG_CHAR_BUFSIZE; - + memset( &(cd2401_debug_buffer[cd2401_debug_index]), '\0', sizeof( struct cd2401_debug_info ) ); cd2401_debug_buffer[cd2401_debug_index].discriminant = CD2401_RX_ISR_INFO; cd2401_debug_buffer[cd2401_debug_index].record_size = cd2401_get_record_size( sizeof( struct cd2401_rx_isr_info ) ); cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.length = max_length; memcpy ( &(cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_info.buffer), buffer, max_length ); - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -373,7 +373,7 @@ void cd2401_record_rx_isr_spurious_info( cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.status = status; cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurdev = spur_dev; cd2401_debug_buffer[cd2401_debug_index].u.rx_isr_spurious_info.spurcount = spur_cnt; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -391,7 +391,7 @@ void cd2401_record_re_isr_spurious_info( cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.channel = ch; cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurdev = spur_dev; cd2401_debug_buffer[cd2401_debug_index].u.re_isr_spurious_info.spurcount = spur_cnt; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -409,7 +409,7 @@ void cd2401_record_modem_isr_spurious_info( cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.channel = ch; cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurdev = spur_dev; cd2401_debug_buffer[cd2401_debug_index].u.modem_isr_spurious_info.spurcount = spur_cnt; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -425,7 +425,7 @@ void cd2401_record_first_open_info( cd2401_get_record_size( sizeof( struct cd2401_first_open_info ) ); cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.channel = ch; cd2401_debug_buffer[cd2401_debug_index].u.first_open_info.init_count = init_count; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -441,7 +441,7 @@ void cd2401_record_last_close_info( cd2401_get_record_size( sizeof( struct cd2401_last_close_info ) ); cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.channel = ch; cd2401_debug_buffer[cd2401_debug_index].u.last_close_info.init_count = init_count; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -455,7 +455,7 @@ void cd2401_record_start_remote_tx_info( cd2401_debug_buffer[cd2401_debug_index].record_size = cd2401_get_record_size( sizeof( struct cd2401_start_remote_tx_info ) ); cd2401_debug_buffer[cd2401_debug_index].u.start_remote_tx_info.channel = ch; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -469,12 +469,12 @@ void cd2401_record_stop_remote_tx_info( cd2401_debug_buffer[cd2401_debug_index].record_size = cd2401_get_record_size( sizeof( struct cd2401_stop_remote_tx_info ) ); cd2401_debug_buffer[cd2401_debug_index].u.stop_remote_tx_info.channel = ch; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } -void cd2401_record_set_attributes_info( +void cd2401_record_set_attributes_info( int minor, uint8_t need_reinit, uint8_t csize, @@ -526,7 +526,7 @@ void cd2401_record_set_attributes_info( cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.rx_period = rx_period; cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.out_baud = out_baud; cd2401_debug_buffer[cd2401_debug_index].u.set_attribute_info.in_baud = in_baud; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -544,7 +544,7 @@ void cd2401_record_drain_output_info( cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.txEmpty = txEmpty; cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_A = own_buf_A; cd2401_debug_buffer[cd2401_debug_index].u.drain_output_info.own_buf_B = own_buf_B; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } @@ -564,7 +564,7 @@ void cd2401_record_delay_info( cd2401_debug_buffer[cd2401_debug_index].u.delay_info.end = end; cd2401_debug_buffer[cd2401_debug_index].u.delay_info.current = current; cd2401_debug_buffer[cd2401_debug_index].u.delay_info.loop_count = loop_count; - + cd2401_debug_index = (cd2401_debug_index + 1 ) % CD2401_DEBUG_BUFFER_SIZE; } diff --git a/c/src/lib/libbsp/m68k/mvme167/console/console.c b/c/src/lib/libbsp/m68k/mvme167/console/console.c index a68737c342..3d760e14a8 100644 --- a/c/src/lib/libbsp/m68k/mvme167/console/console.c +++ b/c/src/lib/libbsp/m68k/mvme167/console/console.c @@ -224,16 +224,16 @@ rtems_isr_entry Prev_modem_isr; /* Previous modem/timer isr */ { unsigned long i = 20000; /* In case clock is off */ rtems_interval ticks_per_second, start_ticks, end_ticks, current_ticks; - + rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks ); end_ticks = start_ticks + delay; - + do { rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, ¤t_ticks); } while ( --i && (current_ticks <= end_ticks) ); - - CD2401_RECORD_DELAY_INFO(( start_ticks, end_ticks, current_ticks, i )); + + CD2401_RECORD_DELAY_INFO(( start_ticks, end_ticks, current_ticks, i )); } @@ -744,7 +744,7 @@ int cd2401_firstOpen( } CD2401_RECORD_FIRST_OPEN_INFO(( minor, Init_count )); - + rtems_interrupt_enable (level); /* Return something */ @@ -771,7 +771,7 @@ int cd2401_lastClose( rtems_interrupt_level level; rtems_interrupt_disable (level); - + /* Mark that the channel is no longer is use */ CD2401_Channel_Info[minor].tty = NULL; @@ -787,7 +787,7 @@ int cd2401_lastClose( } CD2401_RECORD_LAST_CLOSE_INFO(( minor, Init_count )); - + rtems_interrupt_enable (level); /* return something */ @@ -1004,14 +1004,14 @@ int cd2401_setAttributes( cd2401->car = minor; /* Select channel */ read_enabled = cd2401->csr & 0x80 ? TRUE : FALSE; - + if ( (t->c_cflag & CREAD ? TRUE : FALSE ) != read_enabled ) { /* Read enable status is changing */ need_reinitialization = TRUE; } - - if ( need_reinitialization ) { - /* + + if ( need_reinitialization ) { + /* * Could not find a way to test whether the CD2401 was done transmitting. * The TxEmpty interrupt does not seem to indicate that the FIFO is empty * in DMA mode. So, just wait a while for output to drain. May not be @@ -1019,7 +1019,7 @@ int cd2401_setAttributes( * 9600 bsp)... */ cd2401_udelay( 2000L ); - + /* Clear channel */ cd2401_chan_cmd (minor, 0x40, 1); @@ -1033,11 +1033,11 @@ int cd2401_setAttributes( cd2401->cor6 = igncr | icrnl | inlcr | ignbrk | brkint | parmrk | inpck; cd2401->cor7 = istrip; /* No LNext; ignore XON/XOFF if frame error; no tx translations */ /* Special char 1: XON character */ - cd2401->u1.async.schr1 = t->c_cc[VSTART]; + cd2401->u1.async.schr1 = t->c_cc[VSTART]; /* special char 2: XOFF character */ cd2401->u1.async.schr2 = t->c_cc[VSTOP]; - - /* + + /* * Special chars 3 and 4, char range, LNext, RFAR[1..4] and CRC * are unused, left as is. */ @@ -1047,10 +1047,10 @@ int cd2401_setAttributes( cd2401->rcor = (unsigned char)(rx_period >> 8); /* no DPLL */ cd2401->tbpr = (unsigned char)tx_period; cd2401->tcor = (tx_period >> 3) & 0xE0; /* no x1 ext clk, no loopback */ - + /* Timeout for 4 chars at 9600, 8 bits per char, 1 stop bit */ cd2401->u2.w.rtpr = 0x04; /* NEED TO LOOK AT THIS LINE! */ - + if ( t->c_cflag & CREAD ) { /* Re-initialize channel, enable rx and tx */ cd2401_chan_cmd (minor, 0x2A, 1); @@ -1060,8 +1060,8 @@ int cd2401_setAttributes( /* Re-initialize channel, enable tx, disable rx */ cd2401_chan_cmd (minor, 0x29, 1); } - } - + } + CD2401_RECORD_SET_ATTRIBUTES_INFO(( minor, need_reinitialization, csize, cstopb, parodd, parenb, ignpar, inpck, hw_flow_ctl, sw_flow_ctl, extra_flow_ctl, @@ -1070,11 +1070,11 @@ int cd2401_setAttributes( out_baud, in_baud )); rtems_interrupt_enable (level); - - /* + + /* * Looks like the CD2401 needs time to settle after initialization. Give it * 10 ms. I don't really believe it, but if output resumes to quickly after - * this call, the first few characters are not right. + * this call, the first few characters are not right. */ if ( need_reinitialization ) cd2401_udelay( 10000L ); @@ -1117,7 +1117,7 @@ int cd2401_startRemoteTx( cd2401->stcr = 0x01; /* Send SCHR1 ahead of chars in FIFO */ CD2401_RECORD_START_REMOTE_TX_INFO(( minor )); - + rtems_interrupt_enable (level); /* Return something */ @@ -1256,11 +1256,11 @@ int cd2401_drainOutput( CD2401_RECORD_DRAIN_OUTPUT_INFO(( CD2401_Channel_Info[minor].txEmpty, CD2401_Channel_Info[minor].own_buf_A, CD2401_Channel_Info[minor].own_buf_B )); - - while( ! (CD2401_Channel_Info[minor].txEmpty && + + while( ! (CD2401_Channel_Info[minor].txEmpty && CD2401_Channel_Info[minor].own_buf_A && CD2401_Channel_Info[minor].own_buf_B) ); - + /* Return something */ return RTEMS_SUCCESSFUL; } @@ -1291,13 +1291,13 @@ int _167Bug_pollRead( unsigned char c; rtems_interrupt_level previous_level; - /* + /* * Redirection of .INSTAT does not work: 167-Bug crashes. * Switch the input stream to the specified port. * Make sure this is atomic code. */ rtems_interrupt_disable( previous_level ); - + asm volatile( "movew %1, -(%%sp)\n\t"/* Channel */ "trap #15\n\t" /* Trap to 167Bug */ ".short 0x61\n\t" /* Code for .REDIR_I */ @@ -1320,7 +1320,7 @@ int _167Bug_pollRead( : "=d" (c) : ); rtems_interrupt_enable( previous_level ); - + return (int)c; } @@ -1409,7 +1409,7 @@ rtems_status_code do_poll_read( * Output characters through 167Bug. Returns only once every character has * been sent. * - * CR is transmitted AFTER a LF on output. + * CR is transmitted AFTER a LF on output. * * Input parameters: * major - ignored. Should be the major number for this driver. @@ -1453,8 +1453,8 @@ void _BSP_output_char(char c) { rtems_device_minor_number printk_minor; char cr ='\r'; - - /* + + /* * Can't rely on console_initialize having been called before this function * is used. */ @@ -1463,13 +1463,13 @@ void _BSP_output_char(char c) printk_minor = (nvram->console_printk_port & 0x30) >> 4; else printk_minor = PRINTK_MINOR; - + _167Bug_pollWrite(printk_minor, &c, 1); if ( c == '\n' ) _167Bug_pollWrite(printk_minor, &cr, 1); } - + /* *************** * BOILERPLATE * @@ -1496,7 +1496,7 @@ rtems_device_driver console_initialize( if ( NVRAM_CONFIGURE ) { /* J1-4 is on, use NVRAM info for configuration */ console_minor = nvram->console_printk_port & 0x03; - + if ( nvram->console_mode & 0x01 ) /* termios */ rtems_termios_initialize (); @@ -1559,7 +1559,7 @@ rtems_device_driver console_open( NULL, /* startRemoteTx */ 0 /* outputUsesInterrupts */ }; - + static const rtems_termios_callbacks intrCallbacks = { cd2401_firstOpen, /* firstOpen */ cd2401_lastClose, /* lastClose */ @@ -1572,7 +1572,7 @@ rtems_device_driver console_open( }; if ( NVRAM_CONFIGURE ) - /* J1-4 is on, use NVRAM info for configuration */ + /* J1-4 is on, use NVRAM info for configuration */ if ( nvram->console_mode & 0x01 ) /* termios */ if ( nvram->console_mode & 0x02 ) @@ -1612,7 +1612,7 @@ rtems_device_driver console_close( ) { if ( NVRAM_CONFIGURE ) { - /* J1-4 is on, use NVRAM info for configuration */ + /* J1-4 is on, use NVRAM info for configuration */ if ( nvram->console_mode & 0x01 ) /* termios */ return rtems_termios_close (arg); @@ -1642,7 +1642,7 @@ rtems_device_driver console_read( ) { if ( NVRAM_CONFIGURE ) { - /* J1-4 is on, use NVRAM info for configuration */ + /* J1-4 is on, use NVRAM info for configuration */ if ( nvram->console_mode & 0x01 ) /* termios */ return rtems_termios_read (arg); @@ -1672,7 +1672,7 @@ rtems_device_driver console_write( ) { if ( NVRAM_CONFIGURE ) { - /* J1-4 is on, use NVRAM info for configuration */ + /* J1-4 is on, use NVRAM info for configuration */ if ( nvram->console_mode & 0x01 ) /* termios */ return rtems_termios_write (arg); @@ -1702,7 +1702,7 @@ rtems_device_driver console_control( ) { if ( NVRAM_CONFIGURE ) { - /* J1-4 is on, use NVRAM info for configuration */ + /* J1-4 is on, use NVRAM info for configuration */ if ( nvram->console_mode & 0x01 ) /* termios */ return rtems_termios_ioctl (arg); diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c index afdd124382..b93a08fee1 100644 --- a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c +++ b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c @@ -36,7 +36,7 @@ static int mystrcat( ) { int i; - + for ( i = 0; ( *destination++ = *source++) != '\0'; i++ ); return i; } @@ -45,7 +45,7 @@ static int mystrcat( /* * bsp_fatal_error_occurred * - * Called when rtems_fatal_error_occurred() is called. Returns control to + * Called when rtems_fatal_error_occurred() is called. Returns control to * 167Bug. The _Internal_error_Occurred() function has already saved the * parameters in Internal_errors_What_happened. If the function returns, * RTEMS will halt the CPU. @@ -72,33 +72,33 @@ User_extensions_routine bsp_fatal_error_occurred( char index; /* First byte is number of chars in strbuf */ char strbuf[254]; /* In case count is bumped up by one by 167Bug */ } my_p_str; - + my_p_str.index = 0; my_p_str.index += mystrcat( my_p_str.strbuf + my_p_str.index, "\r\nRTEMS Fatal Error Occurred:\r\n the_source = " ); - + switch ( the_source ) { case INTERNAL_ERROR_CORE: - my_p_str.index += mystrcat( + my_p_str.index += mystrcat( my_p_str.strbuf + my_p_str.index, "INTERNAL_ERROR_CORE\r\n is_internal = " ); break; - + case INTERNAL_ERROR_RTEMS_API: - my_p_str.index += mystrcat( + my_p_str.index += mystrcat( my_p_str.strbuf + my_p_str.index, "INTERNAL_ERROR_RTEMS_API\r\n is_internal = " ); break; - + case INTERNAL_ERROR_POSIX_API: - my_p_str.index += mystrcat( + my_p_str.index += mystrcat( my_p_str.strbuf + my_p_str.index, "INTERNAL_ERROR_POSIX_API\r\n is_internal = " ); break; - + default: - my_p_str.index += mystrcat( + my_p_str.index += mystrcat( my_p_str.strbuf + my_p_str.index, "UNKNOWN\r\n is_internal = " ); break; @@ -106,22 +106,22 @@ User_extensions_routine bsp_fatal_error_occurred( if ( is_internal ) my_p_str.index += mystrcat( - my_p_str.strbuf + my_p_str.index, + my_p_str.strbuf + my_p_str.index, "TRUE\r\n the_error = 0x|10,8|\r\n" ); else - my_p_str.index += mystrcat( - my_p_str.strbuf + my_p_str.index, + my_p_str.index += mystrcat( + my_p_str.strbuf + my_p_str.index, "FALSE\r\n the_error = 0x|10,8|\r\n" ); - + lcsr->intr_ena = 0; /* disable interrupts */ m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ - + asm volatile( "movel %0, -(%%a7)\n\t" "pea (%%a7)\n\t" "pea (%1)\n\t" "trap #15\n\t" /* trap to 167Bug (.WRITDLN) */ ".short 0x25\n\t" "trap #15\n\t" - ".short 0x63" + ".short 0x63" :: "d" (the_error), "a" (&my_p_str) ); } diff --git a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h index bc93a8e58b..a1aa2727c7 100644 --- a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h +++ b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h @@ -43,7 +43,7 @@ extern "C" { #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4 #define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024) - + #include <mvme16x_hw.h> /* GCSR is in mvme16x_hw.h */ @@ -153,7 +153,7 @@ typedef volatile struct memc040_regs_ { * nearly identical to the ones of the MEMC040, and the memc040_X structures * can be used to read those first eight registers. */ - + /* * Representation of the Cirrus Logic CL-CD2401 Multi-Protocol Controller @@ -189,7 +189,7 @@ typedef volatile struct cd2401_regs_ { unsigned char rfar2; /* 0xFFF4501E - Receive Frame Address 2 */ unsigned char rfar1; /* 0xFFF4501F - Receive Frame Address 1 */ } sync; - } u1; + } u1; unsigned char reserved4[2]; unsigned char scrh; /* 0xFFF45022 - Special Character Range High */ unsigned char scrl; /* 0xFFF45023 - Special Character Range Low */ @@ -263,7 +263,7 @@ typedef volatile struct cd2401_regs_ { unsigned char risrh; /* 0xFFF45088 - Receive Interrupt Status High */ unsigned char risrl; /* 0xFFF45089 - Receive Interrupt Status Low */ } b; - } u5; + } u5; unsigned char tisr; /* 0xFFF4508A - Transmit Interrupt Status */ unsigned char misr; /* 0xFFF4508B - Modem/Timer Interrupt Status */ unsigned char reserved13[2]; @@ -334,7 +334,7 @@ m68k_isr_entry set_vector( /* * NOTE: Use the standard Console driver entry */ - + /* * NOTE: Use the standard Clock driver entry */ @@ -365,7 +365,7 @@ extern m68k_isr_entry M68Kvec[]; /* vector table address */ #define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ /* - * Define the interrupt mechanism for Time Test 27 + * Define the interrupt mechanism for Time Test 27 * * NOTE: We use software interrupt 0 */ diff --git a/c/src/lib/libbsp/m68k/mvme167/include/fatal.h b/c/src/lib/libbsp/m68k/mvme167/include/fatal.h index ae5e0cf50f..ee04905486 100644 --- a/c/src/lib/libbsp/m68k/mvme167/include/fatal.h +++ b/c/src/lib/libbsp/m68k/mvme167/include/fatal.h @@ -8,7 +8,7 @@ * * $Id$ */ - + #include <rtems/score/interr.h> #include <rtems/score/userext.h> diff --git a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h b/c/src/lib/libbsp/m68k/mvme167/include/page_table.h index e831f21350..eb463ab146 100644 --- a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h +++ b/c/src/lib/libbsp/m68k/mvme167/include/page_table.h @@ -1,6 +1,6 @@ /* page_table.h * - * This file was submitted by Eric Vaitl <vaitl@viasat.com> and + * This file was submitted by Eric Vaitl <vaitl@viasat.com> and * supports page table initialization. * * For now, we only use the transparent translation registers. Page tables @@ -27,17 +27,17 @@ void page_table_teardown( void ); void page_table_init( rtems_configuration_table *config_table ); -enum { - CACHE_WRITE_THROUGH, - CACHE_COPYBACK, +enum { + CACHE_WRITE_THROUGH, + CACHE_COPYBACK, CACHE_NONE_SERIALIZED, - CACHE_NONE + CACHE_NONE }; -enum { - PTM_SUCCESS, - PTM_BAD_ADDR, - PTM_BAD_SIZE, +enum { + PTM_SUCCESS, + PTM_BAD_ADDR, + PTM_BAD_SIZE, PTM_BAD_CACHE, PTM_NO_TABLE_SPACE }; diff --git a/c/src/lib/libbsp/m68k/mvme167/network/network.c b/c/src/lib/libbsp/m68k/mvme167/network/network.c index 73ec6fc1d3..8ab46e8ee9 100644 --- a/c/src/lib/libbsp/m68k/mvme167/network/network.c +++ b/c/src/lib/libbsp/m68k/mvme167/network/network.c @@ -5,12 +5,12 @@ #define KERNEL -/* +/* * Selectively define to debug the network driver. If you define any of these * you must run with polled console I/O. */ - -/* + +/* #define DBG_ADD_CMD #define DBG_WAIT #define DBG_SEND @@ -261,10 +261,10 @@ static i596_scp * uti596_scp_alloc( #endif return sc->pScp; } - + /* allocate enough memory for the Scp block to be aligned on 16 byte boundary */ malloc_16byte_aligned( (void *)&(sc->base_scp), (void *)&(sc->pScp), sizeof( i596_scp ) ); - + #ifdef DBG_MEM printk(("uti596_scp_alloc: Scp base address is %p\n", sc->base_scp)) printk(("uti596_scp_alloc: Scp aligned address is : %p\n",sc->pScp)) @@ -276,9 +276,9 @@ static i596_scp * uti596_scp_alloc( /* * uti596_writePortFunction - * + * * Write the command into the PORT. - * + * * Input parameters: * addr - 16-byte aligned address to write into the PORT. * cmd - 4-bit cmd to write into the PORT @@ -286,7 +286,7 @@ static i596_scp * uti596_scp_alloc( * Output parameters: NONE * * Return value: NONE - * + * * The Motorola manual swapped the high and low registers. */ RTEMS_INLINE_ROUTINE void uti596_writePortFunction( @@ -301,9 +301,9 @@ RTEMS_INLINE_ROUTINE void uti596_writePortFunction( /* * uti596_portReset - * + * * Issue a port Reset to the uti596 - * + * * Input parameters: NONE * * Output parameters: NONE @@ -338,14 +338,14 @@ static unsigned long uti596_portSelfTest( ) { rtems_interval ticks_per_second, start_ticks, end_ticks; - + stp->results = 0xFFFFFFFF; uti596_writePortFunction( stp, UTI596_SELFTEST_PORT_FUNCTION ); rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second); rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); - end_ticks = start_ticks + ticks_per_second; - + end_ticks = start_ticks + ticks_per_second; + do { if( stp->results != 0xFFFFFFFF ) break; @@ -370,7 +370,7 @@ static unsigned long uti596_portSelfTest( } #endif - + /* currently unused by RTEMS */ #if 0 /* @@ -393,14 +393,14 @@ static int uti596_portDump( ) { rtems_interval ticks_per_second, start_ticks, end_ticks; - + dp->dump_status = 0; uti596_writePortFunction( dp, UTI596_DUMP_PORT_FUNCTION ); rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second); rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); - end_ticks = start_ticks + ticks_per_second; - + end_ticks = start_ticks + ticks_per_second; + do { if( dp->dump_status != 0xA006 ) break; @@ -428,7 +428,7 @@ static int uti596_portDump( * uti596_wait * * Wait for a certain condition. - * + * * Input parameters: * sc - pointer to the uti596_softc struct * wait_type - UTI596_NO_WAIT @@ -454,7 +454,7 @@ static int uti596_wait( end_ticks = start_ticks + ticks_per_second; switch( waitType ) { - + case UTI596_NO_WAIT: return 0; @@ -465,9 +465,9 @@ static int uti596_wait( break; else rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); - + } while (start_ticks <= end_ticks); - + if( (sc->scb.command != 0) || (start_ticks > end_ticks) ) { printf("i82596 timed out with status %x, cmd %x.\n", sc->scb.status, sc->scb.command); @@ -475,7 +475,7 @@ static int uti596_wait( } else return 0; - + case UTI596_WAIT_FOR_INITIALIZATION: do { if( !sc->iscp.busy ) @@ -504,7 +504,7 @@ static int uti596_wait( else rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_ticks); } while (start_ticks <= end_ticks); - + if (start_ticks > end_ticks ) { #ifdef DBG_WAIT printk(("uti596_initMem: timed out - STAT_C not obtained\n" )) @@ -520,14 +520,14 @@ static int uti596_wait( } return -1; } - - + + /* * uti596_issueCA * * Issue a Channel Attention command. Possibly wait for the * command to start or complete. - * + * * Input parameters: * sc - pointer to the uti596_softc * wait_type - UTI596_NO_WAIT @@ -546,21 +546,21 @@ static int uti596_issueCA( { /* Issue Channel Attention */ i82596->chan_attn = 0x00000000; - + return (uti596_wait ( sc, waitType )); } /* * uti596_addCmd - * + * * Add a uti596_cmd onto the end of the CBL command chain, * or to the start if the chain is empty. - * + * * Input parameters: * pCmd - a pointer to the command to be added. * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE */ @@ -580,7 +580,7 @@ static void uti596_addCmd( pCmd->next = I596_NULL; _ISR_Disable(level); - + if (uti596_softc.pCmdHead == I596_NULL) { uti596_softc.pCmdHead = uti596_softc.pCmdTail = uti596_softc.scb.pCmd = pCmd; uti596_softc.scb.cmd_pointer = word_swap ((unsigned long)pCmd); @@ -588,7 +588,7 @@ static void uti596_addCmd( uti596_wait ( &uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT ); uti596_softc.scb.command = CUC_START; uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT ); - + _ISR_Enable(level); } else { @@ -607,10 +607,10 @@ static void uti596_addCmd( /* * uti596_addPolledCmd - * + * * Add a single uti596_cmd to the end of the command block list * for processing, send a CU_START and wait for its acceptance - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -653,11 +653,11 @@ void uti596_addPolledCmd( #if 0 /* * uti596_CU_dump - * + * * Dump the LANC 82596 registers * The outcome is the same as the portDump() but executed * via the CU instead of via a PORT access. - * + * * Input parameters: * drp - a pointer to a i596_dump_result structure. * @@ -681,10 +681,10 @@ static void uti596_CU_dump ( i596_dump_result * drp) /* * uti596_dump_scb - * + * * Dump the system control block * This function expands to nothing when using interrupt driven I/O - * + * * Input parameters: NONE * * Output parameters: NONE @@ -735,7 +735,7 @@ static int uti596_setScpAndScb( sc->pCmdHead = sc->scb.pCmd = I596_NULL; /* all 1's */ uti596_writePortFunction( sc->pScp, UTI596_SCP_PORT_FUNCTION ); - + /* Issue CA: pass the scb address to the 596 */ return ( uti596_issueCA ( sc, UTI596_WAIT_FOR_INITIALIZATION ) ); } @@ -743,9 +743,9 @@ static int uti596_setScpAndScb( /* * uti596_diagnose - * + * * Send a diagnose command to the CU - * + * * Input parameters: NONE * * Output parameters: NONE @@ -771,10 +771,10 @@ static int uti596_diagnose( void ) /* * uti596_configure - * + * * Send the CU a configure command with the desired * configuration structure - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -783,7 +783,7 @@ static int uti596_diagnose( void ) * Return value: * 0 if successful, -1 otherwise */ -static int uti596_configure ( +static int uti596_configure ( uti596_softc_ * sc ) { @@ -799,10 +799,10 @@ static int uti596_configure ( /* * uti596_IAsetup - * + * * Send the CU an Individual Address setup command with * the ethernet hardware address - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -816,7 +816,7 @@ static int uti596_IAsetup ( ) { int i; - + sc->set_add.cmd.command = CmdSASetup; for ( i=0; i<6; i++) { sc->set_add.data[i]=sc->arpcom.ac_enaddr[i]; @@ -832,10 +832,10 @@ static int uti596_IAsetup ( /* * uti596_initTBD - * + * * Initialize transmit buffer descriptors * dynamically allocate mem for the number of tbd's required - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -880,10 +880,10 @@ static int uti596_initTBD ( uti596_softc_ * sc ) /* * uti596_initRFA - * + * * Initialize the Receive Frame Area * dynamically allocate mem for the number of rfd's required - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -919,7 +919,7 @@ static int uti596_initRFA( int num ) pRfd = (i596_rfd *) calloc (1, sizeof (struct i596_rfd) ); if ( pRfd != NULL ) { uti596_softc.countRFD++; /* update count */ - uti596_softc.pEndRFA->next = + uti596_softc.pEndRFA->next = (i596_rfd *) word_swap ((unsigned long) pRfd); /* write the link */ uti596_softc.pEndRFA = pRfd; /* move the end */ } @@ -964,10 +964,10 @@ static int uti596_initRFA( int num ) /* * uti596_initMem - * + * * Initialize the 82596 memory structures for Tx and Rx * dynamically allocate mem for the number of tbd's required - * + * * Input parameters: * sc - a pointer to the uti596_softc struct * @@ -994,7 +994,7 @@ void uti596_initMem( if ( i < sc->rxBdCount ) { printk(("init_rfd: only able to allocate %d receive frame descriptors\n", i)) } - + /* * Write the SCB with a pointer to the receive frame area * and keep a pointer for our use. @@ -1033,7 +1033,7 @@ void uti596_initMem( * uti596_initialize * * Reset the 82596 and initialize it with a new SCP. - * + * * Input parameters: * sc - pointer to the uti596_softc * @@ -1055,7 +1055,7 @@ void uti596_initialize( * internal triggering, linear mode */ sc->pScp->sysbus = 0x54; - + /* provide the iscp to the scp, keep a pointer for our use */ sc->pScp->iscp_pointer = word_swap((unsigned long)&sc->iscp); sc->pScp->iscp = &sc->iscp; @@ -1070,7 +1070,7 @@ void uti596_initialize( /* Set up the 82596 */ uti596_setScpAndScb( sc ); - + /* clear the scb command word */ sc->scb.command = 0; } @@ -1081,7 +1081,7 @@ void uti596_initialize( * * Reset the 82596 and initialize it with a new SCP. Enable bus snooping. * Install the interrupt handlers. - * + * * Input parameters: * sc - pointer to the uti596_softc * @@ -1101,7 +1101,7 @@ void uti596_initialize_hardware( pccchip2->LANC_berr_ctl = 0x40; uti596_initialize( sc ); - + /* * Configure interrupt control in PCCchip2 */ @@ -1111,10 +1111,10 @@ void uti596_initialize_hardware( * will supply dirty data and leave dirty data * on read access and sink any data on write */ - /* + /* * Install the interrupt handler * calls rtems_interrupt_catch - */ + */ dummy = (rtems_isr_entry) set_vector( uti596_DynamicInterruptHandler, 0x57, 1 ); /* Initialize the 82596 memory */ @@ -1130,7 +1130,7 @@ void uti596_initialize_hardware( * uti596_reset_hardware * * Reset the 82596 and initialize it with an SCP. - * + * * Input parameters: * sc - pointer to the uti596_softc * @@ -1155,7 +1155,7 @@ void uti596_reset_hardware( printk(("uti596_reset_hardware\n")) #endif uti596_initialize( sc ); - + /* * Wake the transmitter if needed. */ @@ -1178,13 +1178,13 @@ void uti596_reset_hardware( /* * uti596_clearListStatus - * + * * Clear the stat fields for all RFDs - * + * * Input parameters: * pRfd - a pointer to the head of the RFA * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE */ @@ -1201,12 +1201,12 @@ void uti596_clearListStatus( /* * uti596_reset - * + * * Reset the 82596 and reconfigure - * + * * Input parameters: NONE * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE */ @@ -1223,7 +1223,7 @@ void uti596_reset( void ) */ sc->resetDone = 0; uti596_wait ( sc, UTI596_WAIT_FOR_CU_ACCEPT ); - uti596_reset_hardware ( &uti596_softc ); + uti596_reset_hardware ( &uti596_softc ); #ifdef DBG_RESET uti596_diagnose(); @@ -1257,7 +1257,7 @@ void uti596_reset( void ) } /* Re-address the head of the RFA in the SCB */ - sc->scb.pRfd = sc->pBeginRFA; + sc->scb.pRfd = sc->pBeginRFA; sc->scb.rfd_pointer = word_swap((unsigned long)sc->pBeginRFA); /* Clear the status of all RFDs */ @@ -1270,7 +1270,7 @@ void uti596_reset( void ) sc->started = 1; /* assume that the start is accepted */ sc->resetDone = 1; uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT ); - + UTI_596_ASSERT(sc->pCmdHead == I596_NULL, "Reset: CMD not cleared\n") #ifdef DBG_RESET @@ -1281,13 +1281,13 @@ void uti596_reset( void ) /* * uti596_dequeue - * + * * Remove an RFD from the received fram queue - * + * * Input parameters: * ppQ - a pointer to a i596_rfd pointer * - * Output parameters: NONE + * Output parameters: NONE * * Return value: * pRfd - a pointer to the dequeued RFD @@ -1298,7 +1298,7 @@ i596_rfd * uti596_dequeue( { ISR_Level level; i596_rfd * pRfd; - + _ISR_Disable(level); /* invalid address, or empty queue or emptied queue */ @@ -1306,12 +1306,12 @@ i596_rfd * uti596_dequeue( _ISR_Enable(level); return I596_NULL; } - - /* + + /* * Point to the dequeued buffer, then * adjust the queue pointer and detach the buffer */ - pRfd = *ppQ; + pRfd = *ppQ; *ppQ = (i596_rfd *) word_swap ((unsigned long) pRfd->next); pRfd->next = I596_NULL; /* unlink the rfd being returned */ @@ -1322,18 +1322,18 @@ i596_rfd * uti596_dequeue( /* * uti596_append - * + * * Remove an RFD buffer from the RFA and tack it on to * the received frame queue for processing. - * + * * Input parameters: * ppQ - a pointer to the queue pointer * pRfd - a pointer to the buffer to be returned * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE - */ + */ void uti596_append( i596_rfd ** ppQ, @@ -1370,14 +1370,14 @@ void uti596_append( /* * uti596_supplyFD - * + * * Return a buffer (RFD) to the receive frame area (RFA). * Call with interrupts disabled. - * + * * Input parameters: * pRfd - a pointer to the buffer to be returned * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE */ @@ -1388,7 +1388,7 @@ void uti596_supplyFD ( i596_rfd *pLastRfd; UTI_596_ASSERT(pRfd != I596_NULL, "Supplying NULL RFD!\n") - + pRfd -> cmd = CMD_EOL; pRfd -> pRbd = I596_NULL; pRfd -> next = I596_NULL; @@ -1408,7 +1408,7 @@ void uti596_supplyFD ( uti596_softc.countRFD = 1; return; } - + /* * Check if the last RFD is used/read by the 596. */ @@ -1416,7 +1416,7 @@ void uti596_supplyFD ( /* C = complete, B = busy (prefetched) */ if ( pLastRfd != I596_NULL && ! (pLastRfd -> stat & ( STAT_C | STAT_B ) )) { - + /* * Not yet too late to add it */ @@ -1454,13 +1454,13 @@ void uti596_supplyFD ( } else { - + uti596_softc.pEndRFA = pRfd; /* the RFA has been extended */ - + if ( ( uti596_softc.scb.status & SCB_STAT_RNR || uti596_softc.scb.status & RU_NO_RESOURCES ) && uti596_softc.countRFD > 1 ) { - + /* Ensure that beginRFA is not EOL */ uti596_softc.pBeginRFA -> cmd &= ~CMD_EOL; @@ -1476,10 +1476,10 @@ void uti596_supplyFD ( UTI_596_ASSERT(uti596_softc.pBeginRFA != I596_NULL, "rx start w/ NULL begin! \n") uti596_softc.scb.pRfd = uti596_softc.pBeginRFA; uti596_softc.scb.rfd_pointer = word_swap ((unsigned long) uti596_softc.pBeginRFA); - + /* Don't ack RNR! The receiver should be stopped in this case */ uti596_softc.scb.command = RX_START | SCB_STAT_RNR; - + UTI_596_ASSERT( !(uti596_softc.scb.status & SCB_STAT_FR),"FRAME RECEIVED INT COMING!\n") /* send CA signal */ @@ -1506,15 +1506,15 @@ void uti596_supplyFD ( /* * send_packet - * + * * Send a raw ethernet packet, add a * transmit command to the CBL - * + * * Input parameters: * ifp - a pointer to the ifnet structure * m - a pointer to the mbuf being sent * - * Output parameters: NONE + * Output parameters: NONE * * Return value: NONE */ @@ -1701,12 +1701,12 @@ int uti596_attach( else ifp->if_mtu = ETHERMTU; - /* + /* * Check whether parameters should be obtained from NVRAM. If * yes, and if an IP address, netmask, or ethernet address are * provided in NVRAM, cheat, and stuff them into the ifconfig * structure, OVERRIDING and existing or NULL values. - * + * * Warning: If values are provided in NVRAM, the ifconfig entries * must be NULL because buffer memory allocated to hold the * structure values is unrecoverable and would be lost here. @@ -1718,7 +1718,7 @@ int uti596_attach( #if defined(mvme167) if ( !(j1 & 0x10) ) { /* Jumper J1-4 is on, configure from NVRAM */ - + if ( (addr = nvram->ipaddr) ) { /* We have a non-zero entry, copy the value */ if ( (pAddr = malloc ( INET_ADDR_MAX_BUF_SIZE, 0, M_NOWAIT )) ) @@ -1726,7 +1726,7 @@ int uti596_attach( else rtems_panic("Can't allocate ip_address buffer!\n"); } - + if ( (addr = nvram->netmask) ) { /* We have a non-zero entry, copy the value */ if ( (pAddr = malloc ( INET_ADDR_MAX_BUF_SIZE, 0, M_NOWAIT )) ) @@ -1739,7 +1739,7 @@ int uti596_attach( * the arpcom struct. The following if construct serves only to give the * NVRAM parameter the highest priority if J1-4 indicates we are configuring * from NVRAM. - * + * * If the ethernet address is specified in NVRAM, go ahead and copy it. * (ETHER_ADDR_LEN = 6 bytes). */ @@ -1827,11 +1827,11 @@ static void uti596_start( ) { uti596_softc_ *sc = ifp->if_softc; - + #ifdef DBG_START printk(("uti596_start: begins\n")) #endif - + rtems_event_send (sc->txDaemonTid, START_TRANSMIT_EVENT); ifp->if_flags |= IFF_OACTIVE; } @@ -1890,14 +1890,14 @@ void uti596_init( #endif sc->scb.command = RX_START; uti596_issueCA ( sc, UTI596_WAIT_FOR_CU_ACCEPT ); - + /* * Tell the world that we're running. */ ifp->if_flags |= IFF_RUNNING; #ifdef DBG_INIT printk(("uti596_init: completed.\n")) - #endif + #endif } /*********************************************************************** @@ -1940,9 +1940,9 @@ void uti596_init( * Function: void uti596_txDaemon * * Description: Transmit task - * + * * Algorithm: Get mbufs to be transmitted, stuff into RFDs, send - * + * ***********************************************************************/ void uti596_txDaemon( @@ -2181,16 +2181,16 @@ void uti596_resetDaemon( if ( scbStatus ) { /* acknowledge interrupts */ - + /* Write to the ICLR bit in the PCCchip2 control registers to clear * the INT status bit. Clearing INT here *before* sending the CA signal * to the 82596 should ensure that interrupts won't be lost. */ pccchip2->LANC_int_ctl |=0x08; pccchip2->LANC_berr_ctl |=0x08; - + /* printk(("***INFO: ACK %x\n", scbStatus))*/ - + /* Send the CA signal to acknowledge interrupt */ uti596_softc.scb.command = scbStatus; uti596_issueCA ( &uti596_softc, UTI596_NO_WAIT ); @@ -2242,7 +2242,7 @@ void uti596_resetDaemon( } else { printk(("*****WARNING: RNR condition with NULL BeginRFA\n")) - } + } } /* @@ -2251,7 +2251,7 @@ void uti596_resetDaemon( */ if ( scbStatus & SCB_STAT_FR ) { uti596_softc.rxInterrupts++; - + #ifdef DBG_ISR printk(("uti596_DynamicInterruptHandler: Frame received\n")) #endif @@ -2353,7 +2353,7 @@ void uti596_resetDaemon( * ( Perhaps AddCmd is bad? ) */ UTI_596_ASSERT(uti596_softc.pCmdHead == I596_NULL, "****ERROR: command serialization failed\n") - + /* What if the command did not complete OK? */ switch ( pIsrCmd->command & 0x7) { case CmdConfigure: @@ -2448,9 +2448,9 @@ void uti596_resetDaemon( printk(("****WARNING: more commands in list, but no start to NIC\n")) } } /* end if pIsrCmd != NULL && pIsrCmd->stat & STAT_C */ - + else { - if ( pIsrCmd != I596_NULL ) { + if ( pIsrCmd != I596_NULL ) { /* The command MAY be NULL from a RESET */ /* Reset the ethernet card, and wake the transmitter (if necessary) */ printk(("****INFO: Request board reset ( tx )\n")) @@ -2475,7 +2475,7 @@ void uti596_resetDaemon( } /* end if command complete */ - /* + /* * If the receiver has stopped, * check if this is a No Resources scenario, * Try to add more RFD's ( no RBDs are used ) @@ -2606,8 +2606,8 @@ void uti596_resetDaemon( printk(("uti596_DynamicInterruptHandler: X\n")) #endif count_rx=0; - - + + /* Do this last, to ensure that the reset is called at the right time. */ if ( uti596_softc.nic_reset ) { uti596_softc.nic_reset = 0; @@ -2625,9 +2625,9 @@ void uti596_resetDaemon( * Description: * driver ioctl function * handles SIOCGIFADDR, SIOCSIFADDR, SIOCSIFFLAGS - * + * ***********************************************************************/ - + static int uti596_ioctl( struct ifnet *ifp, int command, @@ -2684,7 +2684,7 @@ static int uti596_ioctl( error = EINVAL; break; } - + return error; } @@ -2756,24 +2756,24 @@ static void dumpQ( void ) i596_rfd *pRfd; printk(("savedQ:\n")) - + for( pRfd = uti596_softc.pSavedRfdQueue; pRfd != I596_NULL; pRfd = pRfd -> next) { printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd)) } - + printk(("Inbound:\n")) - + for( pRfd = uti596_softc.pInboundFrameQueue; pRfd != I596_NULL; pRfd = pRfd -> next) { printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd)) } - + printk(("Last Unk: %p\n", uti596_softc.pLastUnkRFD )) printk(("RFA:\n")) - + for( pRfd = uti596_softc.pBeginRFA; pRfd != I596_NULL; pRfd = pRfd -> next) { @@ -2784,7 +2784,7 @@ static void dumpQ( void ) /* * show_buffers - * + * * Print out the RFA and frame queues */ static void show_buffers (void) @@ -2797,7 +2797,7 @@ static void show_buffers (void) uti596_softc.countRFD)) printk(("\nRFA: \n")) - + for ( pRfd = uti596_softc.pBeginRFA; pRfd != I596_NULL; pRfd = pRfd->next) { @@ -2805,7 +2805,7 @@ static void show_buffers (void) pRfd, pRfd->stat, pRfd->cmd)) } printk(("\nInbound: \n")) - + for ( pRfd = uti596_softc.pInboundFrameQueue; pRfd != I596_NULL; pRfd = pRfd->next) { @@ -2814,14 +2814,14 @@ static void show_buffers (void) } printk(("\nSaved: \n")) - + for ( pRfd = uti596_softc.pSavedRfdQueue; pRfd != I596_NULL; pRfd = pRfd->next) { printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n", pRfd, pRfd->stat, pRfd->cmd)) } - + printk(("\nUnknown: %p\n",uti596_softc.pLastUnkRFD)) } @@ -2850,7 +2850,7 @@ static void show_queues(void) printk(("End saved Q 0x%p\n", uti596_softc.pEndSavedQueue)) printk(("\nRFA:\n")) - + for ( pRfd = uti596_softc.pBeginRFA; pRfd != I596_NULL && pRfd != NULL; @@ -2887,11 +2887,11 @@ static void print_eth( for (i = 6; i < 12; i++) { printk ((" %2.2X", add[i])) } - + printk (("\n")) printk (("frame type %2.2X%2.2X\n", add[12], add[13])) - if ( add[12] == 0x08 && add[13] == 0x06 ) { + if ( add[12] == 0x08 && add[13] == 0x06 ) { /* an ARP */ printk (("Hardware type : %2.2X%2.2X\n", add[14],add[15])) printk (("Protocol type : %2.2X%2.2X\n", add[16],add[17])) @@ -2905,13 +2905,13 @@ static void print_eth( } printk (("%x\n", add[27])) printk (("Sender IP addr: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[28 + i])) } printk (("%u\n", add[31])) printk (("Target Enet addr: ")) - + for ( i=0; i< 5 ; i++) { printk (( "%x:", add[32 + i])) } @@ -2936,13 +2936,13 @@ static void print_eth( add[22],add[23],add[24],add[25])) printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35])) printk (("Source IP address: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[26 + i])) } printk (("%u\n", add[29])) printk (("Destination IP address: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[30 + i])) } @@ -3010,15 +3010,15 @@ static void print_pkt( } printk (("%x\n", add[27])) printk (("Sender IP addr: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[28 + i])) } printk (("%u\n", add[31])) printk (("Target Enet addr: ")) - + for ( i=0; i< 5 ; i++) { - printk (( "%x:", add[32 + i])) + printk (( "%x:", add[32 + i])) } printk (("%x\n", add[37])) printk (("Target IP addr: ")) @@ -3040,20 +3040,20 @@ static void print_pkt( add[22],add[23],add[24],add[25])) printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35])) printk (("Source IP address: ")) - + for ( i=0; i< 3 ; i++) { printk(( "%u.", add[26 + i])) } printk(("%u\n", add[29])) printk(("Destination IP address: ")) - + for ( i=0; i< 3 ; i++) { printk(( "%u.", add[30 + i])) } printk(("%u\n", add[33])) printk(("********************IP Packet Data*******************\n")) length -=20; - + for ( i=0; i < length ; i++) { printk(("0x%2.2x ", add[34+i])) } @@ -3081,7 +3081,7 @@ static void print_echo( printk (("print_echo: begins")) - if ( add[12] == 0x08 && add[13] == 0x00 ) { + if ( add[12] == 0x08 && add[13] == 0x00 ) { /* an IP packet */ printk (("Packet Location %p\n", add)) printk (("Dest ")) @@ -3097,7 +3097,7 @@ static void print_echo( } printk (("\n")) printk (("frame type %2.2X%2.2X\n", add[12], add[13])) - + printk (("*********************IP HEADER******************\n")) printk (("IP version/IPhdr length: %2.2X TOS: %2.2X\n", add[14] , add[15])) printk (("IP total length: %2.2X %2.2X, decimal %d\n", add[16], add[17], length = (add[16]<<8 | add[17] ))) @@ -3107,20 +3107,20 @@ static void print_echo( add[22],add[23],add[24],add[25])) printk (("IP packet type: %2.2X code %2.2X\n", add[34],add[35])) printk (("Source IP address: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[26 + i])) } printk (("%u\n", add[29])) printk (("Destination IP address: ")) - + for ( i=0; i< 3 ; i++) { printk (("%u.", add[30 + i])) } printk (("%u\n", add[33])) printk(("********************IP Packet Data*******************\n")) length -=20; - + for ( i=0; i < length ; i++) { printk(("0x%2.2x ", add[34+i])) } diff --git a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h index 38b22af0c5..bc97ac2455 100644 --- a/c/src/lib/libbsp/m68k/mvme167/network/uti596.h +++ b/c/src/lib/libbsp/m68k/mvme167/network/uti596.h @@ -105,13 +105,13 @@ struct enet_statistics{ struct i596_tbd; /* necessary forward declaration */ enum commands { - CmdNOp = 0, - CmdSASetup = 1, - CmdConfigure = 2, + CmdNOp = 0, + CmdSASetup = 1, + CmdConfigure = 2, CmdMulticastList = 3, - CmdTx = 4, - CmdTDR = 5, - CmdDump = 6, + CmdTx = 4, + CmdTDR = 5, + CmdDump = 6, CmdDiagnose = 7 }; @@ -127,7 +127,7 @@ typedef volatile struct i596_dump_result { unsigned short tx_crc_byte01; unsigned short tx_crc_byte23; unsigned short rx_crc_byte01; - unsigned short rx_crc_byte23; + unsigned short rx_crc_byte23; unsigned short rx_temp_mem01; unsigned short rx_temp_mem23; unsigned short rx_temp_mem45; @@ -201,10 +201,10 @@ typedef volatile struct i596_selftest { unsigned long results; } i596_selftest; -/* +/* * Action commands * (big endian, linear mode) - */ + */ typedef volatile struct i596_cmd { unsigned short status; unsigned short command; @@ -251,7 +251,7 @@ typedef volatile struct i596_tbd { unsigned short size; unsigned short pad; volatile struct i596_tbd *next; - char *data; + char *data; } i596_tbd; /* @@ -262,7 +262,7 @@ typedef volatile struct i596_rbd { unsigned short count; unsigned short offset; volatile struct i596_rbd *next; - char *data; + char *data; unsigned short size; unsigned short pad; } i596_rbd; @@ -274,10 +274,10 @@ typedef volatile struct i596_rfd { unsigned short stat; unsigned short cmd; volatile struct i596_rfd *next; - i596_rbd *pRbd; + i596_rbd *pRbd; unsigned short count; unsigned short size; - char data [1532]; + char data [1532]; } i596_rfd; /* @@ -300,7 +300,7 @@ typedef volatile struct i596_scb { i596_rfd *pRfd; } i596_scb; -/* +/* * Intermediate System Configuration Pointer */ typedef volatile struct i596_iscp { @@ -333,7 +333,7 @@ typedef volatile struct uti596_softc { i596_set_add set_add; i596_configure set_conf; i596_tdr tdr; - i596_nop nop; + i596_nop nop; i596_tx *pTxCmd; i596_tbd *pTbd; diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c index 3446711e32..b4084e6558 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspclean.c @@ -45,7 +45,7 @@ static void bsp_return_to_monitor_trap( void ) m68k_set_vbr(0xFFE00000); /* restore 167Bug vectors */ asm volatile( "trap #15\n\t" /* trap to 167Bug */ ".short 0x63" ); /* return to 167Bug (.RETURN) */ - + /* restart program */ start_addr = start; asm volatile( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); @@ -61,7 +61,7 @@ static void bsp_return_to_monitor_trap( void ) * function that makes a 167Bug .RETURN syscall in the trap 13 entry in the * exception vector, and then issues a trap 13 call. It is also possible that * the code was copied from some other OS that does run tasks in user mode. - * In any case, it appears to be a bit of paranoia, and could lead to + * In any case, it appears to be a bit of paranoia, and could lead to * problems if 167Bug is invoked before we get to switch the VBR back to * 167Bug because trap 13 is documented as being reserved for the internal * use of the debugger. diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c index ab716e2dad..f4c640063d 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c @@ -17,7 +17,7 @@ * * $Id$ */ - + #include <string.h> @@ -78,7 +78,7 @@ void bsp_pretasking_hook(void); /* m68k version */ void bsp_start( void ) { void M68KFPSPInstallExceptionHandlers (void); - + extern m68k_isr_entry M68Kvec[]; extern void *_WorkspaceBase; extern void *_RamSize; @@ -88,7 +88,7 @@ void bsp_start( void ) int index; _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */ - + /* * 167Bug Vectors are at 0xFFE00000 */ @@ -96,7 +96,7 @@ void bsp_start( void ) m68k_set_vbr( rom_monitor_vector_table ); - /* + /* * Copy 167Bug Bus Error handler into our exception vector. All 167Bug * exception vectors are the same and point to the generalized exception * handler. The bus error handler is the one that Motorola says to copy @@ -108,7 +108,7 @@ void bsp_start( void ) /* Any exceptions during initialization should be trapped by 167Bug */ m68k_set_vbr( &M68Kvec ); - + /* Install the 68040 FPSP here */ M68KFPSPInstallExceptionHandlers(); @@ -120,7 +120,7 @@ void bsp_start( void ) /* Set the Interrupt Base Vectors */ lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24); - /* + /* * Initialize address translation * May need to pass the multiprocessor configuration table. */ @@ -132,8 +132,8 @@ void bsp_start( void ) Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec; /* Must match value in start.s */ Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - - /* + + /* * If the application has not overriden the default User_extension_table, * supply one with our own fatal error handler that returns control to * 167Bug. @@ -142,7 +142,7 @@ void bsp_start( void ) user_extension_table.fatal = bsp_fatal_error_occurred; BSP_Configuration.User_extension_table = &user_extension_table; } - + /* * Need to "allocate" the memory for the RTEMS Workspace and * tell the RTEMS configuration where it is. This memory is diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c index 34f6683aa7..985144224d 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c +++ b/c/src/lib/libbsp/m68k/mvme167/startup/page_table.c @@ -17,7 +17,7 @@ * is mapped to physical address 0x12345678. With this mapping, the MMU is * only used to control the caching modes for the various regions of memory. * Mapping the virtual addresses to their corresponding physical address makes - * it unnecessary to map addresses under software control during the + * it unnecessary to map addresses under software control during the * initialization of RTEMS, before address translation is turned on. * * With the above approach, address translation may be set up either with the @@ -50,13 +50,13 @@ /* * page_table_init - * + * * Map the virtual range 0x00000000--0x7FFFFFFF to the physical range * 0x00000000--0x7FFFFFFF. Rely on the hardware to raise exceptions when * addressing non-existent memory. Use only the transparent translation * registers (for now). * - * On all processors, the local virtual address range 0xFF000000--0xFFFFFFFF + * On all processors, the local virtual address range 0xFF000000--0xFFFFFFFF * is mapped to the physical address range 0xFF000000--0xFFFFFFFF as * caching disabled, serialized access. * @@ -74,7 +74,7 @@ void page_table_init( unsigned char j1; /* State of J1 jumpers */ register unsigned long dtt0; /* Content of dtt0 */ register unsigned long cacr; /* Content of cacr */ - + /* * Logical base addr = 0x00 map starting at 0x00000000 * Logical address mask = 0x7F map up to 0x7FFFFFFF @@ -85,9 +85,9 @@ void page_table_init( * W = 0b0 read/write access allowed */ dtt0 = 0x007FC020; - + cacr = 0x00000000; /* Data and instruction cache off */ - + /* Read the J1 header */ j1 = (unsigned char)(lcsr->vector_base & 0xFF); @@ -105,15 +105,15 @@ void page_table_init( } else { /* Configure according to other jumper settings */ - + if ( !(j1 & 0x80) ) /* Jumper J1-7 if on, enable data caching */ cacr |= 0x80000000; - + if ( !(j1 & 0x40) ) /* Jumper J1-6 if on, enable instruction caching */ cacr |= 0x00008000; - + if ( j1 & 0x20 ) /* Jumper J1-5 is off, enable writethrough caching */ dtt0 &= 0xFFFFFF9F; @@ -131,7 +131,7 @@ void page_table_init( :: "d" (0), "d" (dtt0), "d" (0xFF00C040), "d" (cacr)); } - + /* * page_table_teardown * diff --git a/c/src/lib/libbsp/m68k/mvme167/timer/timer.c b/c/src/lib/libbsp/m68k/mvme167/timer/timer.c index 0b718c085f..2d78f91685 100644 --- a/c/src/lib/libbsp/m68k/mvme167/timer/timer.c +++ b/c/src/lib/libbsp/m68k/mvme167/timer/timer.c @@ -63,7 +63,7 @@ rtems_isr timerisr(); * It is important that the timer start/stop overhead be * determined when porting or modifying this code. * - * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET! + * THE VMECHIP2 PRESCALER REGISTER IS ASSUMED TO BE SET! * The prescaler is used by all VMEchip2 timers, including the VMEbus grant * timeout counter, the DMAC time off timer, the DMAC timer on timer, and the * VMEbus global timeout timer. The prescaler value is normally set by the @@ -73,7 +73,7 @@ rtems_isr timerisr(); void Timer_initialize() { (void) set_vector( timerisr, TIMER_VECTOR, 0 ); - + Ttimer_val = 0; /* clear timer ISR count */ lcsr->intr_ena &= 0xFEFFFFFF; /* disable tick timer 1 interrupt */ lcsr->intr_clear |= 0x01000000; /* clear tick timer 1 interrupt */ @@ -106,7 +106,7 @@ void Timer_initialize() * LEAST_VALID is the lowest number this routine should trust. Numbers * below this are "noise" and zero is returned. */ -int Read_timer() +int Read_timer() { uint32_t total; |