9
0
Fork 0

Make the early console device/baudrate configurable instead of using

hardcoded values
This commit is contained in:
Sascha Hauer 2008-02-21 13:05:19 +01:00
parent 39050a4c66
commit a26eca758e
3 changed files with 23 additions and 1 deletions

View File

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

View File

@ -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"

View File

@ -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 */