Changeset fd70e206 in rtems


Ignore:
Timestamp:
Sep 18, 2017, 9:28:26 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ec28f31
Parents:
599e6fbd
git-author:
Sebastian Huber <sebastian.huber@…> (09/18/17 09:28:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/19/17 08:57:27)
Message:

bsp/qoriq: Add early debug output initialization

Update #3085.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/console/console-config.c

    r599e6fbd rfd70e206  
    3939#include <bsp/console-termios.h>
    4040
     41static void output_char(char c);
     42
    4143#ifdef QORIQ_IS_HYPERVISOR_GUEST
    4244typedef struct {
     
    6870  ctx->handle = fdt32_to_cpu(*handle);
    6971
     72  BSP_output_char = output_char;
    7073  return true;
    7174}
     
    302305static void output_char(char c)
    303306{
    304   rtems_termios_device_context *ctx = console_device_table[0].context;
     307  rtems_termios_device_context *base = console_device_table[0].context;
    305308
    306309#ifdef QORIQ_IS_HYPERVISOR_GUEST
    307   qoriq_bc_write_polled(ctx, &c, 1);
     310  qoriq_bc_write_polled(base, &c, 1);
    308311#else
    309   ns16550_polled_putchar(ctx, c);
    310 #endif
    311 }
    312 
     312  ns16550_polled_putchar(base, c);
     313#endif
     314}
     315
     316#ifdef QORIQ_IS_HYPERVISOR_GUEST
     317static void qoriq_bc_output_char_init(char c)
     318{
     319  rtems_termios_device_context *base = console_device_table[0].context;
     320
     321  qoriq_bc_probe(base);
     322  output_char(c);
     323}
     324
     325BSP_output_char_function_type BSP_output_char = qoriq_bc_output_char_init;
     326#else
    313327BSP_output_char_function_type BSP_output_char = output_char;
     328#endif
    314329
    315330BSP_polling_getchar_function_type BSP_poll_char = NULL;
Note: See TracChangeset for help on using the changeset viewer.