From 16ce01b0d8414a7250fcf142a966ff22c153e85f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 28 Jan 2011 08:05:54 +0000 Subject: This patch gets usbdebug console working in romstage. - actually hook up usbdebug in printk/print_ for romstage - make usbdebug.c more similar to the Linux kernel version it was originally derived from. - increase retries and timing for usbdebug init (at least one chipset seems to need this) - src/pc80/usbdebug_serial.c is not needed - some small console cleanups Signed-off-by: Stefan Reinauer Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6315 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/pc80/Makefile.inc | 1 - src/pc80/usbdebug_serial.c | 57 ---------------------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 src/pc80/usbdebug_serial.c (limited to 'src/pc80') diff --git a/src/pc80/Makefile.inc b/src/pc80/Makefile.inc index 0dc78bb6d0..659d2e225a 100644 --- a/src/pc80/Makefile.inc +++ b/src/pc80/Makefile.inc @@ -5,7 +5,6 @@ ramstage-$(CONFIG_UDELAY_IO) += udelay_io.c ramstage-y += keyboard.c romstage-$(CONFIG_USE_OPTION_TABLE) += mc146818rtc_early.c -romstage-$(CONFIG_USBDEBUG) += usbdebug_serial.c subdirs-y += vga $(obj)/pc80/mc146818rtc.ramstage.o : $(OPTION_TABLE_H) diff --git a/src/pc80/usbdebug_serial.c b/src/pc80/usbdebug_serial.c deleted file mode 100644 index a330ea6695..0000000000 --- a/src/pc80/usbdebug_serial.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2007 AMD - * Written by Yinghai Lu for AMD. - * - * 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 "../lib/usbdebug.c" -#include -#include - -void early_usbdebug_init(void) -{ - struct ehci_debug_info *dbg_info = (struct ehci_debug_info *) - (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - sizeof(struct ehci_debug_info)); - - usbdebug_init(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, dbg_info); -} - -void usbdebug_tx_byte(unsigned char data) -{ - struct ehci_debug_info *dbg_info; - - /* "Find" dbg_info structure in Cache */ - dbg_info = (struct ehci_debug_info *) - (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - sizeof(struct ehci_debug_info)); - - if (dbg_info->ehci_debug) { - dbgp_bulk_write_x(dbg_info, (char*)&data, 1); - } -} - -void usbdebug_ram_tx_byte(unsigned char data) -{ - struct ehci_debug_info *dbg_info; - - /* "Find" dbg_info structure in RAM */ - dbg_info = (struct ehci_debug_info *) - ((CONFIG_RAMTOP) - sizeof(struct ehci_debug_info)); - - if (dbg_info->ehci_debug) { - dbgp_bulk_write_x(dbg_info, (char*)&data, 1); - } -} -- cgit v1.2.3