summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/leon3/console/printk_support.c')
-rw-r--r--c/src/lib/libbsp/sparc/leon3/console/printk_support.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
index 7b8d3439cb..1af0efd94f 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
@@ -18,6 +18,7 @@
#include <bsp.h>
#include <leon.h>
#include <rtems/libio.h>
+#include <rtems/sysinit.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
@@ -38,7 +39,7 @@ static int pre_printk_pos = 0;
/* Initialize the BSP system debug console layer. It will scan AMBA Plu&Play
* for a debug APBUART and enable RX/TX for that UART.
*/
-void bsp_debug_uart_init(void)
+static void bsp_debug_uart_init(void)
{
int i;
struct ambapp_dev *adev;
@@ -76,6 +77,12 @@ void bsp_debug_uart_init(void)
}
}
+RTEMS_SYSINIT_ITEM(
+ bsp_debug_uart_init,
+ RTEMS_SYSINIT_BSP_START,
+ RTEMS_SYSINIT_ORDER_THIRD
+);
+
/* putchar/getchar for printk */
static void bsp_out_char(char c)
{