From 5f83f6cb7a3f179482db54aaff38f23795dc1acf Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Mon, 4 Feb 2013 14:38:03 +0800 Subject: armv7: Clean up arm/snow bootblock build process. Remove duplicated / testing code and share more driver for bootblock, romstage and ramstage. The __PRE_RAM__ is now also defined in bootblock build stage, since bootblock is executed before RAM is initialized. Change-Id: I4f5469b1545631eee1cf9f2f5df93cbe3a58268b Signed-off-by: Hung-Te Lin Reviewed-on: http://review.coreboot.org/2282 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/armv7/lib/Makefile.inc | 2 +- src/arch/armv7/lib/romstage_console.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/arch/armv7/lib') diff --git a/src/arch/armv7/lib/Makefile.inc b/src/arch/armv7/lib/Makefile.inc index e33618bfc3..343e9f8378 100644 --- a/src/arch/armv7/lib/Makefile.inc +++ b/src/arch/armv7/lib/Makefile.inc @@ -1,4 +1,5 @@ bootblock-y += syslib.c +bootblock-y += romstage_console.c romstage-y += cache_v7.c romstage-y += cache-cp15.c @@ -8,7 +9,6 @@ romstage-y += romstage_console.c romstage-y += syslib.c #ramstage-y += printk_init.c -#romstage-y += walkcbfs.S ramstage-y += div0.c ramstage-y += div64.S diff --git a/src/arch/armv7/lib/romstage_console.c b/src/arch/armv7/lib/romstage_console.c index ead26f3521..42a96646b0 100644 --- a/src/arch/armv7/lib/romstage_console.c +++ b/src/arch/armv7/lib/romstage_console.c @@ -19,6 +19,7 @@ #include #include +// TODO Unify with x86 (CONFIG_CONSOLE_SERIAL8250) #if CONFIG_SERIAL_CONSOLE #include #endif @@ -43,18 +44,15 @@ void console_tx_byte(unsigned char byte) #endif } -/* FIXME(dhendrix): add this back in */ -#if 0 -static void console_tx_flush(void) +static void _console_tx_flush(void) { -#if CONFIG_CONSOLE_SERIAL - uart_tx_flush(CONFIG_CONSOLE_SERIAL_UART_ADDRESS); +#if CONFIG_SERIAL_CONSOLE + uart_tx_flush(); #endif #if CONFIG_USBDEBUG usbdebug_tx_flush(0); #endif } -#endif int do_printk(int msg_level, const char *fmt, ...) { @@ -69,7 +67,7 @@ int do_printk(int msg_level, const char *fmt, ...) i = vtxprintf(console_tx_byte, fmt, args); va_end(args); -// console_tx_flush(); + _console_tx_flush(); return i; } -- cgit v1.2.3