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 <ranma+coreboot@tdiedrich.de>
Reviewed-on: http://review.coreboot.org/7355
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Tobias Diedrich 2014-11-08 00:38:33 +01:00 committed by Patrick Georgi
parent 0dab6d192b
commit ae3adffb7d
1 changed files with 15 additions and 0 deletions

View File

@ -85,6 +85,21 @@ void hudson_enable(device_t dev)
{ {
printk(BIOS_DEBUG, "hudson_enable()\n"); printk(BIOS_DEBUG, "hudson_enable()\n");
switch (dev->path.pci.devfn) { 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): case PCI_DEVFN(0x14, 7):
if (dev->enabled == 0) { if (dev->enabled == 0) {
// read the VENDEV ID // read the VENDEV ID