예제 #1
0
status_t
arch_debug_console_init(kernel_args *args)
{
	// first try with hints from the FDT
	gArchDebugUART = debug_uart_from_fdt(args->platform_args.fdt);

	// Do we can some kind of direct fallback here
	// (aka, guess arch_get_uart_pl011 or arch_get_uart_8250?)
	if (gArchDebugUART == NULL)
		return B_ERROR;

	gArchDebugUART->InitEarly();

	return B_OK;
}
예제 #2
0
extern "C" void
serial_init(const void *fdt)
{
    // first try with hints from the FDT
    gUART = debug_uart_from_fdt(fdt);

    // fallback to known board UARTs
#if defined(BOARD_UART_DEBUG) && defined(BOARD_UART_CLOCK)
    if (gUART == NULL) {
#ifdef BOARD_UART_PL011
        gUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
#else
        gUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
#endif
    }
#endif

    if (gUART == NULL)
        return;

    serial_enable();
}