From 855da1f07b52898c7edcaffe5baabe9d485bbd83 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 10 Sep 2013 10:58:28 -0700 Subject: [PATCH] console: conditionally include console in bootblock Right now some console specific objects are included in the bootblock even if CONFIG_BOOTBLOCK_CONSOLE is disabled while others are not. Make all of them conditional and also fix a preprocessor misuse in bootblock_simple.c and a stray (useless) die() in the Exynos wakeup code that made inclusion of those files necessary. BRANCH=none BUG=none TEST=boot tested on pit Change-Id: Ia7f9d17654466f199b0e13afbdc9e14c9706530f Signed-off-by: Stefan Reinauer Reviewed-on: https://chromium-review.googlesource.com/168772 Reviewed-by: David Hendrix --- src/arch/armv7/bootblock_simple.c | 2 +- src/console/Makefile.inc | 4 ++-- src/cpu/samsung/exynos5250/wakeup.c | 4 ++-- src/cpu/samsung/exynos5420/wakeup.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/arch/armv7/bootblock_simple.c b/src/arch/armv7/bootblock_simple.c index 6ed63ce1d0..1d07353de4 100644 --- a/src/arch/armv7/bootblock_simple.c +++ b/src/arch/armv7/bootblock_simple.c @@ -65,7 +65,7 @@ void main(void) bootblock_mainboard_init(); } -#ifdef CONFIG_BOOTBLOCK_CONSOLE +#if CONFIG_BOOTBLOCK_CONSOLE console_init(); #endif diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc index 498d179d9f..613395fffc 100644 --- a/src/console/Makefile.inc +++ b/src/console/Makefile.inc @@ -15,8 +15,8 @@ romstage-y += post.c romstage-y += die.c bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += vtxprintf.c -bootblock-y += console.c -bootblock-y += die.c +bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += console.c +bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += die.c ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250_console.c ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem_console.c diff --git a/src/cpu/samsung/exynos5250/wakeup.c b/src/cpu/samsung/exynos5250/wakeup.c index 5764c83bd6..02f2ccd2db 100644 --- a/src/cpu/samsung/exynos5250/wakeup.c +++ b/src/cpu/samsung/exynos5250/wakeup.c @@ -28,8 +28,8 @@ void wakeup(void) power_init(); /* Ensure ps_hold_setup() for early wakeup. */ power_exit_wakeup(); - /* Should never return. */ - die("Failed to wake up.\n"); + /* Should never return. If we do, reset. */ + power_reset(); } int get_wakeup_state(void) diff --git a/src/cpu/samsung/exynos5420/wakeup.c b/src/cpu/samsung/exynos5420/wakeup.c index af7ef73f89..9d3f065233 100644 --- a/src/cpu/samsung/exynos5420/wakeup.c +++ b/src/cpu/samsung/exynos5420/wakeup.c @@ -31,8 +31,8 @@ void wakeup(void) dcache_mmu_disable(); icache_invalidate_all(); power_exit_wakeup(); - /* Should never return. */ - die("Failed to wake up.\n"); + /* Should never return. If we do, reset. */ + power_reset(); } int get_wakeup_state(void)