[coreboot] [commit] r5586 - in trunk/src: console cpu/intel/model_106cx cpu/intel/model_6bx cpu/intel/model_6ex cpu/intel/model_6fx include lib mainboard/getac/p470 mainboard/gigabyte/ga_2761gxdk mainboard/gi...

repository service svn at coreboot.org
Tue May 25 18:17:45 CEST 2010


Author: stepan
Date: Tue May 25 18:17:45 2010
New Revision: 5586
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5586

Log:
Long ago we agreed on kicking the _direct appendix because everything in
coreboot is direct. This patch does it.
Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>

Added:
   trunk/src/console/usbdebug_console.c
      - copied, changed from r5583, trunk/src/console/usbdebug_direct_console.c
   trunk/src/include/usbdebug.h
      - copied unchanged from r5585, trunk/src/include/usbdebug_direct.h
   trunk/src/lib/usbdebug.c
      - copied, changed from r5585, trunk/src/lib/usbdebug_direct.c
   trunk/src/pc80/usbdebug_serial.c
      - copied, changed from r5583, trunk/src/pc80/usbdebug_direct_serial.c
   trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug.c
      - copied unchanged from r5583, trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug_direct.c
   trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug.c
      - copied unchanged from r5583, trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug_direct.c
   trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c
      - copied unchanged from r5583, trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c
   trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug.c
      - copied unchanged from r5583, trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug_direct.c
Deleted:
   trunk/src/console/usbdebug_direct_console.c
   trunk/src/include/usbdebug_direct.h
   trunk/src/lib/usbdebug_direct.c
   trunk/src/pc80/usbdebug_direct_serial.c
   trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug_direct.c
   trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug_direct.c
   trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c
   trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug_direct.c
Modified:
   trunk/src/console/Makefile.inc
   trunk/src/cpu/intel/model_106cx/model_106cx_init.c
   trunk/src/cpu/intel/model_6bx/model_6bx_init.c
   trunk/src/cpu/intel/model_6ex/model_6ex_init.c
   trunk/src/cpu/intel/model_6fx/model_6fx_init.c
   trunk/src/lib/Makefile.inc
   trunk/src/mainboard/getac/p470/romstage.c
   trunk/src/mainboard/gigabyte/ga_2761gxdk/romstage.c
   trunk/src/mainboard/gigabyte/m57sli/romstage.c
   trunk/src/mainboard/intel/d945gclf/romstage.c
   trunk/src/mainboard/kontron/986lcd-m/romstage.c
   trunk/src/mainboard/msi/ms7260/romstage.c
   trunk/src/mainboard/msi/ms9652_fam10/romstage.c
   trunk/src/mainboard/nvidia/l1_2pvv/romstage.c
   trunk/src/mainboard/roda/rk886ex/romstage.c
   trunk/src/mainboard/tyan/s2912/romstage.c
   trunk/src/mainboard/tyan/s2912_fam10/romstage.c
   trunk/src/southbridge/amd/sb600/sb600_usb.c
   trunk/src/southbridge/amd/sb700/sb700_usb.c
   trunk/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
   trunk/src/southbridge/nvidia/mcp55/mcp55_usb2.c
   trunk/src/southbridge/sis/sis966/sis966_usb2.c

Modified: trunk/src/console/Makefile.inc
==============================================================================
--- trunk/src/console/Makefile.inc	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/console/Makefile.inc	Tue May 25 18:17:45 2010	(r5586)
@@ -10,7 +10,7 @@
 initobj-$(CONFIG_USE_DCACHE_RAM) += console.o
 
 driver-$(CONFIG_CONSOLE_SERIAL8250) += uart8250_console.o
-driver-$(CONFIG_USBDEBUG_DIRECT) += usbdebug_direct_console.o
+driver-$(CONFIG_USBDEBUG_DIRECT) += usbdebug_console.o
 driver-$(CONFIG_CONSOLE_VGA) += vga_console.o
 driver-$(CONFIG_CONSOLE_BTEXT) += btext_console.o
 driver-$(CONFIG_CONSOLE_BTEXT) += font-8x16.o

Copied and modified: trunk/src/console/usbdebug_console.c (from r5583, trunk/src/console/usbdebug_direct_console.c)
==============================================================================
--- trunk/src/console/usbdebug_direct_console.c	Mon May 24 17:51:15 2010	(r5583, copy source)
+++ trunk/src/console/usbdebug_console.c	Tue May 25 18:17:45 2010	(r5586)
@@ -17,7 +17,7 @@
 
 #include <string.h>
 #include <console/console.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #include <pc80/mc146818rtc.h>
 
 static struct ehci_debug_info dbg_info;

Modified: trunk/src/cpu/intel/model_106cx/model_106cx_init.c
==============================================================================
--- trunk/src/cpu/intel/model_106cx/model_106cx_init.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/cpu/intel/model_106cx/model_106cx_init.c	Tue May 25 18:17:45 2010	(r5586)
@@ -29,7 +29,7 @@
 #include <cpu/intel/hyperthreading.h>
 #include <cpu/x86/cache.h>
 #include <cpu/x86/mtrr.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 
 static const uint32_t microcode_updates[] = {
 	/*  Dummy terminator  */

Modified: trunk/src/cpu/intel/model_6bx/model_6bx_init.c
==============================================================================
--- trunk/src/cpu/intel/model_6bx/model_6bx_init.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/cpu/intel/model_6bx/model_6bx_init.c	Tue May 25 18:17:45 2010	(r5586)
@@ -30,7 +30,7 @@
 #include <cpu/x86/lapic.h>
 #include <cpu/intel/microcode.h>
 #include <cpu/x86/cache.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 
 static const uint32_t microcode_updates[] = {
 	#include "microcode-737-MU16b11c.h"

Modified: trunk/src/cpu/intel/model_6ex/model_6ex_init.c
==============================================================================
--- trunk/src/cpu/intel/model_6ex/model_6ex_init.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/cpu/intel/model_6ex/model_6ex_init.c	Tue May 25 18:17:45 2010	(r5586)
@@ -31,7 +31,7 @@
 #include <cpu/intel/hyperthreading.h>
 #include <cpu/x86/cache.h>
 #include <cpu/x86/mtrr.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 
 static const uint32_t microcode_updates[] = {
 	#include "microcode-1624-m206e839.h"

Modified: trunk/src/cpu/intel/model_6fx/model_6fx_init.c
==============================================================================
--- trunk/src/cpu/intel/model_6fx/model_6fx_init.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/cpu/intel/model_6fx/model_6fx_init.c	Tue May 25 18:17:45 2010	(r5586)
@@ -31,7 +31,7 @@
 #include <cpu/intel/hyperthreading.h>
 #include <cpu/x86/cache.h>
 #include <cpu/x86/mtrr.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 
 static const uint32_t microcode_updates[] = {
 	#include "microcode-2129-m206f257.h"

Copied: trunk/src/include/usbdebug.h (from r5585, trunk/src/include/usbdebug_direct.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/include/usbdebug.h	Tue May 25 18:17:45 2010	(r5586, copy of r5585, trunk/src/include/usbdebug_direct.h)
@@ -0,0 +1,37 @@
+/*
+ * 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
+ */
+
+#ifndef USBDEBUG_H
+#define USBDEBUG_H
+
+struct ehci_debug_info {
+        void *ehci_caps;
+        void *ehci_regs;
+        void *ehci_debug;
+        unsigned devnum;
+        unsigned endpoint_out;
+        unsigned endpoint_in;
+};
+
+int dbgp_bulk_write_x(struct ehci_debug_info *dbg_info, const char *bytes, int size);
+int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size);
+void set_ehci_base(unsigned ehci_base);
+void set_ehci_debug(unsigned ehci_deug);
+unsigned get_ehci_debug(void);
+void set_debug_port(unsigned port);
+
+#endif

Modified: trunk/src/lib/Makefile.inc
==============================================================================
--- trunk/src/lib/Makefile.inc	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/lib/Makefile.inc	Tue May 25 18:17:45 2010	(r5586)
@@ -23,7 +23,8 @@
 initobj-y += lzma.o
 #initobj-y += lzmadecode.o
 
-obj-$(CONFIG_USBDEBUG_DIRECT) += usbdebug_direct.o
+obj-$(CONFIG_USBDEBUG_DIRECT) += usbdebug.o
+
 obj-$(CONFIG_COMPRESSED_PAYLOAD_LZMA) += lzma.o
 
 obj-$(CONFIG_BOOTSPLASH) += jpeg.o

Copied and modified: trunk/src/lib/usbdebug.c (from r5585, trunk/src/lib/usbdebug_direct.c)
==============================================================================
--- trunk/src/lib/usbdebug_direct.c	Tue May 25 18:02:28 2010	(r5585, copy source)
+++ trunk/src/lib/usbdebug.c	Tue May 25 18:17:45 2010	(r5586)
@@ -31,7 +31,7 @@
 
 #include <usb_ch9.h>
 #include <ehci.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 
 #define USB_DEBUG_DEVNUM 127
 

Modified: trunk/src/mainboard/getac/p470/romstage.c
==============================================================================
--- trunk/src/mainboard/getac/p470/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/getac/p470/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -40,7 +40,7 @@
 #if CONFIG_USBDEBUG_DIRECT
 #define DBGP_DEFAULT 0
 #include "southbridge/intel/i82801gx/i82801gx_usb_debug.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 
 #include "lib/ramtest.c"

Modified: trunk/src/mainboard/gigabyte/ga_2761gxdk/romstage.c
==============================================================================
--- trunk/src/mainboard/gigabyte/ga_2761gxdk/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/gigabyte/ga_2761gxdk/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -55,8 +55,8 @@
 
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/sis/sis966/sis966_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/sis/sis966/sis966_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Modified: trunk/src/mainboard/gigabyte/m57sli/romstage.c
==============================================================================
--- trunk/src/mainboard/gigabyte/m57sli/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/gigabyte/m57sli/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -53,8 +53,8 @@
 
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Modified: trunk/src/mainboard/intel/d945gclf/romstage.c
==============================================================================
--- trunk/src/mainboard/intel/d945gclf/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/intel/d945gclf/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -42,7 +42,7 @@
 #if CONFIG_USBDEBUG_DIRECT
 #define DBGP_DEFAULT 1
 #include "southbridge/intel/i82801gx/i82801gx_usb_debug.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 
 #include "lib/ramtest.c"

Modified: trunk/src/mainboard/kontron/986lcd-m/romstage.c
==============================================================================
--- trunk/src/mainboard/kontron/986lcd-m/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/kontron/986lcd-m/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -50,9 +50,9 @@
 
 #if CONFIG_USBDEBUG_DIRECT
 #define DBGP_DEFAULT 1
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #include "southbridge/intel/i82801gx/i82801gx_usb_debug.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 
 #include "lib/ramtest.c"

Modified: trunk/src/mainboard/msi/ms7260/romstage.c
==============================================================================
--- trunk/src/mainboard/msi/ms7260/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/msi/ms7260/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -57,8 +57,8 @@
 
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 #include <cpu/amd/model_fxx_rev.h>

Modified: trunk/src/mainboard/msi/ms9652_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/msi/ms9652_fam10/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/msi/ms9652_fam10/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -46,8 +46,8 @@
 #include "option_table.h"
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Modified: trunk/src/mainboard/nvidia/l1_2pvv/romstage.c
==============================================================================
--- trunk/src/mainboard/nvidia/l1_2pvv/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/nvidia/l1_2pvv/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -53,8 +53,8 @@
 
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Modified: trunk/src/mainboard/roda/rk886ex/romstage.c
==============================================================================
--- trunk/src/mainboard/roda/rk886ex/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/roda/rk886ex/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -44,7 +44,7 @@
 #if CONFIG_USBDEBUG_DIRECT
 #define DBGP_DEFAULT 1
 #include "southbridge/intel/i82801gx/i82801gx_usb_debug.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 
 #include "lib/ramtest.c"

Modified: trunk/src/mainboard/tyan/s2912/romstage.c
==============================================================================
--- trunk/src/mainboard/tyan/s2912/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/tyan/s2912/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -53,8 +53,8 @@
 
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Modified: trunk/src/mainboard/tyan/s2912_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/tyan/s2912_fam10/romstage.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/mainboard/tyan/s2912_fam10/romstage.c	Tue May 25 18:17:45 2010	(r5586)
@@ -46,8 +46,8 @@
 #include "option_table.h"
 #include <console/console.h>
 #if CONFIG_USBDEBUG_DIRECT
-#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c"
-#include "pc80/usbdebug_direct_serial.c"
+#include "southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c"
+#include "pc80/usbdebug_serial.c"
 #endif
 #include "lib/ramtest.c"
 

Copied and modified: trunk/src/pc80/usbdebug_serial.c (from r5583, trunk/src/pc80/usbdebug_direct_serial.c)
==============================================================================
--- trunk/src/pc80/usbdebug_direct_serial.c	Mon May 24 17:51:15 2010	(r5583, copy source)
+++ trunk/src/pc80/usbdebug_serial.c	Tue May 25 18:17:45 2010	(r5586)
@@ -15,7 +15,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
  */
 
-#include "../lib/usbdebug_direct.c"
+#include "../lib/usbdebug.c"
 
 static void early_usbdebug_direct_init(void)
 {

Copied: trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug.c (from r5583, trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug_direct.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug.c	Tue May 25 18:17:45 2010	(r5586, copy of r5583, trunk/src/southbridge/amd/sb600/sb600_enable_usbdebug_direct.c)
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008 Advanced Micro Devices, Inc.
+ *
+ * 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
+ */
+
+#ifndef SB600_DEVN_BASE
+
+#define SB600_DEVN_BASE 0
+
+#endif
+
+#define EHCI_BAR_INDEX 0x10
+#define EHCI_BAR 0xFEF00000
+#define EHCI_DEBUG_OFFSET 0xE0
+
+static void sb600_enable_usbdebug_direct(u32 port)
+{
+	set_debug_port(port);
+	pci_write_config32(PCI_DEV(0, SB600_DEVN_BASE + 0x13, 5),
+			   EHCI_BAR_INDEX, EHCI_BAR);
+	pci_write_config8(PCI_DEV(0, SB600_DEVN_BASE + 0x13, 5), 0x04, 0x2);	/* mem space enabe */
+}

Modified: trunk/src/southbridge/amd/sb600/sb600_usb.c
==============================================================================
--- trunk/src/southbridge/amd/sb600/sb600_usb.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/southbridge/amd/sb600/sb600_usb.c	Tue May 25 18:17:45 2010	(r5586)
@@ -22,7 +22,7 @@
 #include <device/pci.h>
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #include <arch/io.h>
 #include "sb600.h"
 

Copied: trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug.c (from r5583, trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug_direct.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug.c	Tue May 25 18:17:45 2010	(r5586, copy of r5583, trunk/src/southbridge/amd/sb700/sb700_enable_usbdebug_direct.c)
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Advanced Micro Devices, Inc.
+ *
+ * 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
+ */
+
+#ifndef SB700_DEVN_BASE
+
+#define SB700_DEVN_BASE 0
+
+#endif
+
+#define EHCI_BAR_INDEX 0x10
+#define EHCI_BAR 0xFEF00000
+#define EHCI_DEBUG_OFFSET 0xE0
+
+static void sb700_enable_usbdebug_direct(u32 port)
+{
+	set_debug_port(port);
+	pci_write_config32(PCI_DEV(0, SB700_DEVN_BASE + 0x13, 5),
+			   EHCI_BAR_INDEX, EHCI_BAR);
+	pci_write_config8(PCI_DEV(0, SB700_DEVN_BASE + 0x13, 5), 0x04, 0x2);	/* mem space enabe */
+}

Modified: trunk/src/southbridge/amd/sb700/sb700_usb.c
==============================================================================
--- trunk/src/southbridge/amd/sb700/sb700_usb.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/southbridge/amd/sb700/sb700_usb.c	Tue May 25 18:17:45 2010	(r5586)
@@ -22,7 +22,7 @@
 #include <device/pci.h>
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #include <arch/io.h>
 #include "sb700.h"
 

Modified: trunk/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
==============================================================================
--- trunk/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c	Tue May 25 18:17:45 2010	(r5586)
@@ -24,7 +24,7 @@
 #include <device/pci_ids.h>
 #include "i82801gx.h"
 #if CONFIG_USBDEBUG_DIRECT
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #endif
 #include <arch/io.h>
 

Copied: trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c (from r5583, trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug.c	Tue May 25 18:17:45 2010	(r5586, copy of r5583, trunk/src/southbridge/nvidia/mcp55/mcp55_enable_usbdebug_direct.c)
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2004 Tyan Computer
+ * Written by Yinghai Lu <yhlu at tyan.com> for Tyan Computer.
+ * Copyright (C) 2006,2007 AMD
+ * Written by Yinghai Lu <yinghai.lu at amd.com> 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+
+#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
+	#define MCP55_DEVN_BASE	CONFIG_HT_CHAIN_END_UNITID_BASE
+#else
+	#define MCP55_DEVN_BASE	CONFIG_HT_CHAIN_UNITID_BASE
+#endif
+
+#define EHCI_BAR_INDEX	0x10
+#define EHCI_BAR	0xFEF00000
+#define EHCI_DEBUG_OFFSET	0x98
+
+static void set_debug_port(unsigned port)
+{
+	uint32_t dword;
+	dword = pci_read_config32(PCI_DEV(0, MCP55_DEVN_BASE+2, 1), 0x74);
+	dword &= ~(0xf<<12);
+	dword |= (port<<12);
+	pci_write_config32(PCI_DEV(0, MCP55_DEVN_BASE+2, 1), 0x74, dword);
+
+}
+
+static void mcp55_enable_usbdebug_direct(unsigned port)
+{
+	set_debug_port(port);
+	pci_write_config32(PCI_DEV(0, MCP55_DEVN_BASE+2, 1), EHCI_BAR_INDEX, EHCI_BAR);
+	pci_write_config8(PCI_DEV(0, MCP55_DEVN_BASE+2, 1), 0x04, 0x2); // mem space enabe
+}
+

Modified: trunk/src/southbridge/nvidia/mcp55/mcp55_usb2.c
==============================================================================
--- trunk/src/southbridge/nvidia/mcp55/mcp55_usb2.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/southbridge/nvidia/mcp55/mcp55_usb2.c	Tue May 25 18:17:45 2010	(r5586)
@@ -28,7 +28,7 @@
 #include <device/pci_ops.h>
 #include "mcp55.h"
 #if CONFIG_USBDEBUG_DIRECT
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #endif
 
 extern struct ehci_debug_info dbg_info;

Copied: trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug.c (from r5583, trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug_direct.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug.c	Tue May 25 18:17:45 2010	(r5586, copy of r5583, trunk/src/southbridge/sis/sis966/sis966_enable_usbdebug_direct.c)
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2004 Tyan Computer
+ * Written by Yinghai Lu <yhlu at tyan.com> for Tyan Computer.
+ * Copyright (C) 2006,2007 AMD
+ * Written by Yinghai Lu <yinghai.lu at amd.com> 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+
+#if CONFIG_HT_CHAIN_END_UNITID_BASE < CONFIG_HT_CHAIN_UNITID_BASE
+	#define SIS966_DEVN_BASE	CONFIG_HT_CHAIN_END_UNITID_BASE
+#else
+	#define SIS966_DEVN_BASE	CONFIG_HT_CHAIN_UNITID_BASE
+#endif
+
+#define EHCI_BAR_INDEX	0x10
+#define EHCI_BAR	0xFEF00000
+#define EHCI_DEBUG_OFFSET	0x98
+
+static void set_debug_port(unsigned port)
+{
+	uint32_t dword;
+	dword = pci_read_config32(PCI_DEV(0, SIS966_DEVN_BASE+2, 1), 0x74);
+	dword &= ~(0xf<<12);
+	dword |= (port<<12);
+	pci_write_config32(PCI_DEV(0, SIS966_DEVN_BASE+2, 1), 0x74, dword);
+
+}
+
+static void sis966_enable_usbdebug_direct(unsigned port)
+{
+	set_debug_port(port);
+	pci_write_config32(PCI_DEV(0, SIS966_DEVN_BASE+2, 1), EHCI_BAR_INDEX, EHCI_BAR);
+	pci_write_config8(PCI_DEV(0, SIS966_DEVN_BASE+2, 1), 0x04, 0x2); // mem space enabe
+}
+

Modified: trunk/src/southbridge/sis/sis966/sis966_usb2.c
==============================================================================
--- trunk/src/southbridge/sis/sis966/sis966_usb2.c	Tue May 25 18:02:28 2010	(r5585)
+++ trunk/src/southbridge/sis/sis966/sis966_usb2.c	Tue May 25 18:17:45 2010	(r5586)
@@ -31,7 +31,7 @@
 #include <arch/io.h>
 #include "sis966.h"
 #if CONFIG_USBDEBUG_DIRECT
-#include <usbdebug_direct.h>
+#include <usbdebug.h>
 #endif
 
 extern struct ehci_debug_info dbg_info;




More information about the coreboot mailing list