From ae3adffb7d67d85deb82f46455bcffa6b0e49b42 Mon Sep 17 00:00:00 2001 From: Tobias Diedrich Date: Sat, 8 Nov 2014 00:38:33 +0100 Subject: amd/agesa/hudson: Add support for hiding the USB1.1-only OHCI The hudson chipset has 4 USB controllers, the fourth is USB1.1-only and (presumably) not used very often, add support for hiding it: 00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 03) USB1 (3.0, XHCI) 00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 03) 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) USB2 (2.0, OHCI+EHCI) 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) USB3 (2.0, OHCI+EHCI) 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11) 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11) USB4 (1.1, OHCI only) Change-Id: I804e7852fd0a6f870dd118b429473cb06ebac9a4 Signed-off-by: Tobias Diedrich Reviewed-on: http://review.coreboot.org/7355 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/southbridge/amd/agesa/hudson/hudson.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/southbridge/amd/agesa/hudson/hudson.c b/src/southbridge/amd/agesa/hudson/hudson.c index cafd6c6c18..2bc3bc9aaf 100644 --- a/src/southbridge/amd/agesa/hudson/hudson.c +++ b/src/southbridge/amd/agesa/hudson/hudson.c @@ -85,6 +85,21 @@ void hudson_enable(device_t dev) { printk(BIOS_DEBUG, "hudson_enable()\n"); switch (dev->path.pci.devfn) { + case PCI_DEVFN(0x14, 5): + if (dev->enabled == 0) { + // read the VENDEV ID + device_t usb_dev = dev_find_slot( 0, PCI_DEVFN( 0x14, 5)); + u32 usb_device_id = pci_read_config32(usb_dev, 0) >> 16; + u8 reg8; + if (usb_device_id == PCI_DEVICE_ID_ATI_SB900_USB_20_5) { + /* turn off and remove device 0:14.5 from PCI space */ + reg8 = pm_read8(0xef); + reg8 &= ~(1 << 6); + pm_write8(0xef, reg8); + } + } + break; + case PCI_DEVFN(0x14, 7): if (dev->enabled == 0) { // read the VENDEV ID -- cgit v1.2.3