bsp/leon3: Use sysinit for bsp_debug_uart_init()

This commit is contained in:
Sebastian Huber
2016-06-20 08:16:54 +02:00
parent a4fa007be9
commit 40b80d86ef
3 changed files with 8 additions and 7 deletions

View File

@@ -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)
{

View File

@@ -392,8 +392,6 @@ void leon3_cpu_counter_initialize(void);
/* GRLIB extended IRQ controller register */
void leon3_ext_irq_init(void);
void bsp_debug_uart_init(void);
void leon3_power_down_loop(void) RTEMS_NO_RETURN;
static inline uint32_t leon3_get_cpu_count(

View File

@@ -18,7 +18,6 @@
#include <bsp.h>
#include <leon.h>
#include <rtems/bspIo.h>
#include <bsp/bootcard.h>
#if defined(RTEMS_SMP) || defined(RTEMS_MULTIPROCESSING)
@@ -67,7 +66,4 @@ void bsp_start( void )
LEON3_Cpu_Index = _LEON3_Get_current_processor();
leon3_cpu_counter_initialize();
/* find debug UART for printk() */
bsp_debug_uart_init();
}