Changeset c8b7b32 in rtems


Ignore:
Timestamp:
May 12, 2014, 1:21:52 PM (6 years ago)
Author:
Ralf Kirchner <ralf.kirchner@…>
Branches:
4.11, master
Children:
774ee002
Parents:
390e73c4
git-author:
Ralf Kirchner <ralf.kirchner@…> (05/12/14 13:21:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/12/14 13:57:50)
Message:

bsp/altera-caclone-v: Early printk support

Make sure printk can work early during BSP startup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/altera-cyclone-v/console/console-config.c

    r390e73c4 rc8b7b32  
    8888};
    8989
    90 
    9190unsigned long Console_Configuration_Count =
    9291  RTEMS_ARRAY_SIZE(Console_Configuration_Ports);
     
    162161{
    163162  int minor = (int) Console_Port_Minor;
    164   const console_tbl *ct = Console_Port_Tbl != NULL ?
     163  console_tbl *ct = Console_Port_Tbl != NULL ?
    165164    Console_Port_Tbl[minor] : &Console_Configuration_Ports[minor];
    166   const console_fns *cf = ct->pDeviceFns;
    167165
    168166  if (c == '\n') {
    169     (*cf->deviceWritePolled)(minor, '\r');
     167    ns16550_outch_polled( ct, '\r' );
    170168  }
    171169
    172   (*cf->deviceWritePolled)(minor, c);
     170  ns16550_outch_polled( ct, c );
    173171}
    174172
    175 static void output_char_init(char c)
    176 {
    177   if (Console_Port_Tbl == NULL) {
    178     int minor;
    179     const console_fns *cf;
    180 
    181     bsp_console_select();
    182 
    183     minor = (int) Console_Port_Minor;
    184     cf = Console_Configuration_Ports[minor].pDeviceFns;
    185 
    186     (*cf->deviceInitialize)(minor);
    187   }
    188 
    189   BSP_output_char = output_char;
    190   output_char(c);
    191 }
    192 
    193 BSP_output_char_function_type BSP_output_char = output_char_init;
     173BSP_output_char_function_type BSP_output_char = output_char;
    194174
    195175BSP_polling_getchar_function_type BSP_poll_char = NULL;
Note: See TracChangeset for help on using the changeset viewer.