aboutsummaryrefslogtreecommitdiff
path: root/src/arch/armv7/lib/romstage_console.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-02-06 22:01:18 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-02-08 03:24:09 +0100
commitb868d40830787ba5a92721d131c38165285b7795 (patch)
tree382cf2dbf7896d9e370a1361797a72bd35540882 /src/arch/armv7/lib/romstage_console.c
parent580fa2bf316d4796e5ed76cbbd3e454479fb0688 (diff)
armv7: Use same console initialization procedure for all ARM stages
Use same console initialization procedure for all ARM stages (bootblock, romstage, and ramstage): #include <console/console.h> ... console_init() ... printk(level, format, ...) Verified to boot on armv7/snow with console messages in all stages. Change-Id: Idd689219035e67450ea133838a2ca02f8d74557e Signed-off-by: Hung-Te Lin <hungte@chromium.org> Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/2301 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/armv7/lib/romstage_console.c')
-rw-r--r--src/arch/armv7/lib/romstage_console.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/arch/armv7/lib/romstage_console.c b/src/arch/armv7/lib/romstage_console.c
deleted file mode 100644
index b0ac34e32e..0000000000
--- a/src/arch/armv7/lib/romstage_console.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; version 2 of
- * the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#include <console/console.h>
-#include <console/vtxprintf.h>
-// TODO Unify with x86 (CONFIG_CONSOLE_SERIAL8250)
-#if CONFIG_CONSOLE_SERIAL
-#include <uart.h>
-#endif
-#if CONFIG_USBDEBUG
-#include <usbdebug.h>
-#endif
-
-/* FIXME: need to make console driver more generic */
-void console_tx_byte(unsigned char byte)
-{
- if (byte == '\n')
- console_tx_byte('\r');
-
-#if CONFIG_CONSOLE_SERIAL_UART
- uart_tx_byte(byte);
-#endif
-#if CONFIG_USBDEBUG
- usbdebug_tx_byte(0, byte);
-#endif
-#if CONFIG_CONSOLE_CBMEM
- cbmemc_tx_byte(byte);
-#endif
-}
-
-static void _console_tx_flush(void)
-{
-#if CONFIG_CONSOLE_SERIAL_UART
- uart_tx_flush();
-#endif
-#if CONFIG_USBDEBUG
- usbdebug_tx_flush(0);
-#endif
-}
-
-int do_printk(int msg_level, const char *fmt, ...)
-{
- va_list args;
- int i;
-
- if (msg_level > console_loglevel) {
- return 0;
- }
-
- va_start(args, fmt);
- i = vtxprintf(console_tx_byte, fmt, args);
- va_end(args);
-
- _console_tx_flush();
-
- return i;
-}