diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-02-21 13:05:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-02-21 13:05:19 +0100 |
commit | a26eca758e2611f362682ecb48dd6bc23665738d (patch) | |
tree | 22fd699461fa00e2f3f672ed6adab3f5d475ae55 /common | |
parent | 39050a4c665195c7a495fe1ae45100f44dc9ead2 (diff) | |
download | barebox-a26eca758e2611f362682ecb48dd6bc23665738d.tar.gz barebox-a26eca758e2611f362682ecb48dd6bc23665738d.tar.xz |
Make the early console device/baudrate configurable instead of using
hardcoded values
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 17 | ||||
-rw-r--r-- | common/startup.c | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/common/Kconfig b/common/Kconfig index 12ff729eb2..14dbb90fe2 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -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" diff --git a/common/startup.c b/common/startup.c index 03d5aae286..8e1c2993b1 100644 --- a/common/startup.c +++ b/common/startup.c @@ -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 */ |