ARM: Separate the early console (romstage) from the bootblock console.

It might be that you want an early console in romstage before RAM is up, but
you can't or don't want to support the console all the way back in the
bootblock. By making the console in those two different environments
configurable seperately that becomes possible.

On the 5250 console output as early as the bootblock works, but on the 5420 it
only starts working in the ROM stage after clocks have been initialized.

BUG=chrome-os-partner:19420
TEST=Built and booted on pit with another change and an external tool, and was
able to get serial output. Built for snow.
BRANCH=None

Change-Id: Ie27ae7a7b22f336d23893618969efde4145fefd7
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/57725
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Gabe Black 2013-06-06 00:21:20 -07:00 committed by ChromeBot
commit 53119fdeab
10 changed files with 31 additions and 18 deletions

View file

@ -1,5 +1,15 @@
menu "Console"
config DEFAULT_BOOTBLOCK_CONSOLE
bool
default n
config BOOTBLOCK_CONSOLE
bool "Enable early (bootblock) console output."
default DEFAULT_BOOTBLOCK_CONSOLE
help
Use console during the bootblock if supported
config DEFAULT_EARLY_CONSOLE
bool
default n

View file

@ -14,7 +14,7 @@ romstage-y += console.c
romstage-y += post.c
romstage-y += die.c
bootblock-$(CONFIG_EARLY_CONSOLE) += vtxprintf.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += vtxprintf.c
bootblock-y += console.c
bootblock-y += die.c

View file

@ -101,7 +101,8 @@ int console_tst_byte(void)
void console_init(void)
{
#if CONFIG_EARLY_CONSOLE
#if defined(__BOOT_BLOCK__) && CONFIG_BOOTBLOCK_CONSOLE || \
!defined(__BOOT_BLOCK__) && CONFIG_EARLY_CONSOLE
#if CONFIG_USBDEBUG
enable_usbdebug(CONFIG_USBDEBUG_DEFAULT_PORT);