Changeset 441b90e in rtems


Ignore:
Timestamp:
Feb 1, 2012, 8:32:28 PM (8 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.11, master
Children:
d1887baf
Parents:
41572c4
git-author:
Jennifer Averett <Jennifer.Averett@…> (02/01/12 20:32:28)
git-committer:
Joel Sherrill <joel.sherrill@…> (02/01/12 20:32:28)
Message:

Correct run-time selection of console port.

This was broken by conversion of console driver to libchip style.

Location:
c/src/lib/libbsp/i386/pc386
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    r41572c4 r441b90e  
    8080    console/kbd_parser.c console/serial_mouse_config.c \
    8181    ../../i386/shared/comm/uart.c ../../i386/shared/comm/tty_drv.c \
    82     ../../shared/console.c ../../shared/console_select.c \
     82    ../../shared/console.c console/console_select.c \
    8383    ../../shared/console_read.c ../../shared/console_write.c \
    8484    console/console_control.c console/conscfg.c console/printk_support.c \
  • c/src/lib/libbsp/i386/pc386/console/printk_support.c

    r41572c4 r441b90e  
    2323#include <libchip/serial.h>
    2424#include <libchip/ns16550.h>
    25 
    26 BSP_output_char_function_type     BSP_output_char = _IBMPC_outch;
    27 BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input;
     25#include "../../../shared/console_private.h"
    2826
    2927rtems_device_minor_number         BSPPrintkPort = 0;
     
    3331);
    3432
    35 void BSP_com_outch(char ch)
     33void BSP_outch(char ch);
     34int BSP_inch(void);
     35
     36void BSP_outch(char ch)
    3637{
    37   console_tbl                   *cptr;
     38  if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
     39    _IBMPC_outch( ch );
     40  } else {
     41    console_tbl *cptr;
    3842
    39   cptr = &Console_Configuration_Ports[BSPPrintkPort];
    40 
    41   return cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
     43    cptr = &Console_Configuration_Ports[BSPPrintkPort];
     44    cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
     45  }
    4246}
    4347
    44 int BSP_com_inch( void )
     48int BSP_inch(void)
    4549{
    4650  int           result;
    47   console_tbl   *cptr;
    4851
    49   cptr = &Console_Configuration_Ports[BSPPrintkPort];
    50 
    51   do {
    52     result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
    53   } while (result == -1);
    54 
     52  if ( BSPPrintkPort == BSP_CONSOLE_VGA ) {
     53    result = BSP_wait_polled_input();
     54  } else {
     55    do {
     56      result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
     57    } while (result == -1);
     58  }
    5559  return result;
    5660}
    5761
     62BSP_output_char_function_type     BSP_output_char = BSP_outch;
     63BSP_polling_getchar_function_type BSP_poll_char = BSP_inch;
     64
  • c/src/lib/libbsp/i386/pc386/include/bsp.h

    r41572c4 r441b90e  
    135135
    136136/*-------------------------------------------------------------------------+
     137| Console Defines
     138|      WARNING: These Values MUST match the order in
     139|               Console_Configuration_Ports
     140+--------------------------------------------------------------------------*/
     141#define    BSP_CONSOLE_VGA            0
     142#define    BSP_CONSOLE_COM1           1
     143#define    BSP_CONSOLE_COM2           2
     144
     145/*-------------------------------------------------------------------------+
    137146| Macros
    138147+--------------------------------------------------------------------------*/
  • c/src/lib/libbsp/i386/pc386/start/start.S

    r41572c4 r441b90e  
    6969        EXTERN (debugPollingGetChar)
    7070        EXTERN (checkCPUtypeSetCr0)
    71         EXTERN (BSP_console_select)
    7271        EXTERN (printk)
    7372#ifdef __SSE__
Note: See TracChangeset for help on using the changeset viewer.