Make the early console device/baudrate configurable instead of using
hardcoded values
This commit is contained in:
parent
39050a4c66
commit
a26eca758e
|
@ -10,3 +10,6 @@ config MACH_PHYCORE_MPC5200B_TINY_REV
|
|||
old board you should set this option to 1
|
||||
|
||||
endmenu
|
||||
|
||||
config EARLY_CONSOLE_PORT
|
||||
default "psc3" if MACH_PHYCORE_MPC5200B_TINY
|
|
@ -161,6 +161,23 @@ config CONSOLE_ACTIVATE_ALL
|
|||
Enabling this options activates all consoles on startup, so
|
||||
you will get output and a prompt on all consoles simultaneously.
|
||||
|
||||
config EARLY_CONSOLE_PORT
|
||||
string
|
||||
depends on HAS_EARLY_INIT
|
||||
prompt "Console device for early output"
|
||||
help
|
||||
Choose the device on which you want to have early output printed
|
||||
to. This is only used during startup when no device information
|
||||
is available.
|
||||
|
||||
config EARLY_CONSOLE_BAUDRATE
|
||||
int
|
||||
default 115200
|
||||
depends on HAS_EARLY_INIT
|
||||
prompt "Early console baudrate"
|
||||
help
|
||||
Choose the baudrate for your early console.
|
||||
|
||||
config OF_FLAT_TREE
|
||||
bool
|
||||
prompt "Open Firmware flat device tree support"
|
||||
|
|
|
@ -64,7 +64,9 @@ void early_init (void)
|
|||
memcpy((void *)EARLY_INITDATA, RELOC(&__early_init_data_begin),
|
||||
(ulong)&__early_init_data_end -
|
||||
(ulong)&__early_init_data_begin);
|
||||
early_console_start(RELOC("psc3"), 115200);
|
||||
|
||||
early_console_start(RELOC(CONFIG_EARLY_CONSOLE_PORT),
|
||||
CONFIG_EARLY_CONSOLE_BAUDRATE);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAS_EARLY_INIT */
|
||||
|
|
Loading…
Reference in New Issue