Changeset 2faea99 in rtems for bsps


Ignore:
Timestamp:
Nov 7, 2018, 10:08:50 AM (10 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
97a86719
Parents:
e292beba
git-author:
Sebastian Huber <sebastian.huber@…> (11/07/18 10:08:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/07/18 10:09:51)
Message:

bsp/realview-pbx-a9: Fix printk() support

Avoid dependencies on the Termios support in case only printk() is used
by the application.

Location:
bsps/arm/realview-pbx-a9
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/realview-pbx-a9/console/console-config.c

    re292beba r2faea99  
    1717
    1818#include <bsp.h>
     19#include <bsp/arm-pl050.h>
     20#include <bsp/console.h>
     21#include <bsp/console-termios.h>
    1922#include <bsp/irq.h>
    20 #include <bsp/arm-pl011.h>
    21 #include <bsp/arm-pl050.h>
    22 #include <bsp/console-termios.h>
    23 
    24 static arm_pl011_context pl011_context = {
    25   .base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("PL011"),
    26   .regs = (volatile pl011 *) 0x10009000,
    27   .irq = RVPBXA9_IRQ_UART_0,
    28   .initial_baud = 115200
    29 };
    3023
    3124static arm_pl050_context pl050_context = {
     
    3629};
    3730
    38 static void output_char(char c)
    39 {
    40   arm_pl011_write_polled(&pl011_context.base, c);
    41 }
    42 
    43 static bool pl011_probe(rtems_termios_device_context *base)
    44 {
    45   BSP_output_char = output_char;
    46 
    47   return arm_pl011_probe(base);
    48 }
    49 
    50 static void output_char_init(char c)
    51 {
    52   pl011_probe(&pl011_context.base);
    53   output_char(c);
    54 }
    55 
    56 BSP_output_char_function_type BSP_output_char = output_char_init;
    57 
    58 BSP_polling_getchar_function_type BSP_poll_char = NULL;
    59 
    6031const console_device console_device_table[] = {
    6132  {
    6233    .device_file = "/dev/ttyS0",
    63     .probe = pl011_probe,
     34    .probe = rvpbx_pl011_probe,
    6435    .handler = &arm_pl011_fns,
    65     .context = &pl011_context.base
     36    .context = &rvpbx_pl011_context.base
    6637  }, {
    6738    .device_file = SERIAL_MOUSE_DEVICE_PS2,
Note: See TracChangeset for help on using the changeset viewer.