[coreboot] New patch to review for coreboot: c6cedee USBDEBUG: Enable the ECHI in AMD Southbridge
Zheng Bao (zheng.bao@amd.com)
gerrit at coreboot.org
Mon Nov 19 07:42:00 CET 2012
Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1880
-gerrit
commit c6cedee66609ad46b78c371762fba2bc915a68c0
Author: Zheng Bao <fishbaozi at gmail.com>
Date: Mon Nov 19 15:59:57 2012 +0800
USBDEBUG: Enable the ECHI in AMD Southbridge
Since SB800, USB2.0 debug port is dev 0x12, func 2.
Change-Id: Ie0e33cb2f0833b0baeef81323e1a0634242fbe55
Signed-off-by: Zheng Bao <zheng.bao at amd.com>
Signed-off-by: zbao <fishbaozi at gmail.com>
---
src/southbridge/amd/agesa/hudson/Makefile.inc | 3 ++-
src/southbridge/amd/agesa/hudson/enable_usbdebug.c | 6 ++++--
src/southbridge/amd/cimx/sb800/Makefile.inc | 3 +++
src/southbridge/amd/sb800/enable_usbdebug.c | 6 ++++--
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc
index 4bd1523..cbfa4fe 100644
--- a/src/southbridge/amd/agesa/hudson/Makefile.inc
+++ b/src/southbridge/amd/agesa/hudson/Makefile.inc
@@ -9,7 +9,8 @@ driver-y += pci.c
driver-y += pcie.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_setup.c
ramstage-$(CONFIG_HAVE_ACPI_RESUME) += spi.c
diff --git a/src/southbridge/amd/agesa/hudson/enable_usbdebug.c b/src/southbridge/amd/agesa/hudson/enable_usbdebug.c
index c558a26..263b270 100644
--- a/src/southbridge/amd/agesa/hudson/enable_usbdebug.c
+++ b/src/southbridge/amd/agesa/hudson/enable_usbdebug.c
@@ -45,8 +45,10 @@ void set_debug_port(unsigned int port)
void enable_usbdebug(unsigned int port)
{
- pci_write_config32(PCI_DEV(0, HUDSON_DEVN_BASE + 0x13, 5),
+ outb(0xEF, 0xCD6);
+ outb(0x7F, 0xCD7);
+ pci_write_config32(PCI_DEV(0, HUDSON_DEVN_BASE + 0x12, 2),
EHCI_BAR_INDEX, CONFIG_EHCI_BAR);
- pci_write_config8(PCI_DEV(0, HUDSON_DEVN_BASE + 0x13, 5), 0x04, 0x2); /* mem space enabe */
+ pci_write_config8(PCI_DEV(0, HUDSON_DEVN_BASE + 0x12, 2), 0x04, 0x6); /* mem space enabe */
set_debug_port(port);
}
diff --git a/src/southbridge/amd/cimx/sb800/Makefile.inc b/src/southbridge/amd/cimx/sb800/Makefile.inc
index f02f0f7..05dbfd3 100644
--- a/src/southbridge/amd/cimx/sb800/Makefile.inc
+++ b/src/southbridge/amd/cimx/sb800/Makefile.inc
@@ -30,6 +30,9 @@ ramstage-y += late.c
ramstage-$(CONFIG_HAVE_ACPI_RESUME) += spi.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+
driver-y += smbus.c
driver-y += lpc.c
diff --git a/src/southbridge/amd/sb800/enable_usbdebug.c b/src/southbridge/amd/sb800/enable_usbdebug.c
index 174b0f2..a176a05 100644
--- a/src/southbridge/amd/sb800/enable_usbdebug.c
+++ b/src/southbridge/amd/sb800/enable_usbdebug.c
@@ -45,8 +45,10 @@ void set_debug_port(unsigned int port)
void enable_usbdebug(unsigned int port)
{
- pci_write_config32(PCI_DEV(0, SB800_DEVN_BASE + 0x13, 5),
+ outb(0xEF, 0xCD6);
+ outb(0x7F, 0xCD7);
+ pci_write_config32(PCI_DEV(0, SB800_DEVN_BASE + 0x12, 2),
EHCI_BAR_INDEX, CONFIG_EHCI_BAR);
- pci_write_config8(PCI_DEV(0, SB800_DEVN_BASE + 0x13, 5), 0x04, 0x2); /* mem space enabe */
+ pci_write_config8(PCI_DEV(0, SB800_DEVN_BASE + 0x12, 2), 0x04, 0x6); /* mem space enabe */
set_debug_port(port);
}
More information about the coreboot
mailing list