From 61f70f722da1cee00f7f705844b7ae7bbae5feec Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 19 Dec 2011 15:56:34 -0800 Subject: arm: Implement CONFIG_DELAY_CONSOLE Delay serial console calls and do them later, to support the CONFIG_DELAY_CONSOLE option. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Ie15a887843a8b5f29fce055f7a2e17b7fc1e614f Reviewed-on: https://gerrit.chromium.org/gerrit/13209 Reviewed-by: Che-Liang Chiou Reviewed-by: Tom Wai-Hong Tam Tested-by: Simon Glass Commit-Ready: Simon Glass --- arch/arm/lib/board.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch') diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 7f8daf7f8f..10ef2c8128 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -263,8 +263,10 @@ init_fnc_t *init_sequence[] = { get_clocks, #endif env_init, /* initialize environment */ +#ifndef CONFIG_DELAY_CONSOLE init_baudrate, /* initialze baudrate settings */ serial_init, /* serial communications setup */ +#endif console_init_f, /* stage 1 init of console */ display_banner, /* say that we are here */ #if defined(CONFIG_DISPLAY_CPUINFO) @@ -534,6 +536,13 @@ void board_init_r (gd_t *id, ulong dest_addr) debug ("monitor flash len: %08lX\n", monitor_flash_len); board_init(); /* Setup chipselects */ + /* Do the delayed console init here, after board init is complete */ +#ifdef CONFIG_DELAY_CONSOLE + init_baudrate(); + serial_init(); + console_ready(); +#endif + #ifdef CONFIG_SERIAL_MULTI serial_initialize(); #endif -- cgit v1.2.3