dm: serial: allow skip console serial init
Always use debug uart. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Id751856abd7be219e8acb4c5986469a804051934
This commit is contained in:
parent
50c379531a
commit
d45e5655df
|
|
@ -256,6 +256,11 @@ config CONSOLE_DISABLE_CLI
|
|||
help
|
||||
This disable CLI interactive in verified-boot.
|
||||
|
||||
config CONSOLE_SERIAL_SKIP_INIT
|
||||
bool "Skip console serial init"
|
||||
help
|
||||
Skip console serial init and always use debug uart.
|
||||
|
||||
config DISABLE_CONSOLE
|
||||
bool "disable console in & out"
|
||||
help
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
|
|||
#error "Serial is required before relocation - define CONFIG_$(SPL_)SYS_MALLOC_F_LEN to make this work"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CONSOLE_SERIAL_SKIP_INIT
|
||||
static int serial_check_stdout(const void *blob, struct udevice **devp)
|
||||
{
|
||||
int node;
|
||||
|
|
@ -87,8 +88,9 @@ static int serial_check_stdout(const void *blob, struct udevice **devp)
|
|||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF_LIVE
|
||||
#if defined(CONFIG_OF_LIVE) && !defined(CONFIG_CONSOLE_SERIAL_SKIP_INIT)
|
||||
/*
|
||||
* Hide and present pinctrl prop int live device tree
|
||||
*
|
||||
|
|
@ -146,6 +148,7 @@ static inline void serial_console_hide_prop(char **p1, char **p2) {}
|
|||
static inline void serial_console_present_prop(char *p1, char *p2) {}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CONSOLE_SERIAL_SKIP_INIT
|
||||
static void serial_find_console_or_panic(void)
|
||||
{
|
||||
const void *blob = gd->fdt_blob;
|
||||
|
|
@ -227,6 +230,9 @@ int serial_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int serial_init(void) { return 0; }
|
||||
#endif
|
||||
|
||||
/* Called after relocation */
|
||||
void serial_initialize(void)
|
||||
|
|
|
|||
Loading…
Reference in New Issue