forked from Imagelibrary/rtems
arm/xilinx-zynq: Initialize debug console once
This commit is contained in:
@@ -50,11 +50,17 @@ static void zynq_debug_console_out(char c)
|
|||||||
zynq_uart_write_polled(base, c);
|
zynq_uart_write_polled(base, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void zynq_debug_console_early_init(char c);
|
||||||
|
|
||||||
static void zynq_debug_console_init(void)
|
static void zynq_debug_console_init(void)
|
||||||
{
|
{
|
||||||
rtems_termios_device_context *base =
|
rtems_termios_device_context *base =
|
||||||
&zynq_uart_instances[BSP_CONSOLE_MINOR].base;
|
&zynq_uart_instances[BSP_CONSOLE_MINOR].base;
|
||||||
|
|
||||||
|
if (BSP_output_char != zynq_debug_console_early_init) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
zynq_uart_initialize(base);
|
zynq_uart_initialize(base);
|
||||||
BSP_output_char = zynq_debug_console_out;
|
BSP_output_char = zynq_debug_console_out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user