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/console | |
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/console')
-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 |
2 files changed, 65 insertions, 65 deletions
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); |