[coreboot-gerrit] Patch set updated for coreboot: southbridge/amd/sb700: Add CMOS option to disable legacy USB support

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Tue Jan 26 21:47:25 CET 2016


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13155

-gerrit

commit 7017e7e8f07102773fdb2070c8d4b1a13ba1d373
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Tue Nov 24 14:11:56 2015 -0600

    southbridge/amd/sb700: Add CMOS option to disable legacy USB support
    
    Change-Id: I136c259136ce66a0c319a965ae0ee27f66dce1b3
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 src/southbridge/amd/sb700/sm.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/southbridge/amd/sb700/sm.c b/src/southbridge/amd/sb700/sm.c
index 7c9c004..5f6d20e 100644
--- a/src/southbridge/amd/sb700/sm.c
+++ b/src/southbridge/amd/sb700/sm.c
@@ -66,6 +66,7 @@ static void sm_init(device_t dev)
 	u32 dword;
 	void *ioapic_base;
 	uint32_t power_state;
+	uint32_t enable_legacy_usb;
 	u32 nmi_option;
 
 	printk(BIOS_INFO, "sm_init().\n");
@@ -75,10 +76,23 @@ static void sm_init(device_t dev)
 	ioapic_base = (void *)(pci_read_config32(dev, 0x74) & (0xffffffe0));
 	setup_ioapic(ioapic_base, 0); /* Don't rename IOAPIC ID. */
 
+	enable_legacy_usb = 1;
+	get_option(&enable_legacy_usb, "enable_legacy_usb");
+
 	/* 2.10 Interrupt Routing/Filtering */
-	dword = pci_read_config8(dev, 0x62);
-	dword |= 3;
-	pci_write_config8(dev, 0x62, dword);
+	byte = pci_read_config8(dev, 0x62);
+	if (enable_legacy_usb)
+		byte |= 0x3;
+	else
+		byte &= ~0x3;
+	pci_write_config8(dev, 0x62, byte);
+
+	byte = pci_read_config8(dev, 0x67);
+	if (enable_legacy_usb)
+		byte |= 0x1 << 7;
+	else
+		byte &= ~(0x1 << 7);
+	pci_write_config8(dev, 0x67, byte);
 
 	/* Delay back to back interrupts to the CPU. */
 	dword = pci_read_config16(dev, 0x64);



More information about the coreboot-gerrit mailing list