Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
soc/amd/picasso: Delete partially implemented usb implementation

There is now a generic xhci driver we can use to generate the xHCI ACPI
nodes.

BUG=b:154756391
TEST=Boot trembyle and look at ACPI table

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I3e9973dd416ccd51971f4d9410bed991eb7c3c41
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41901
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/soc/amd/picasso/Makefile.inc
M src/soc/amd/picasso/acpi/sb_pci0_fch.asl
D src/soc/amd/picasso/acpi/usb.asl
M src/soc/amd/picasso/chip.c
D src/soc/amd/picasso/usb.c
5 files changed, 0 insertions(+), 129 deletions(-)

diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc
index d19402f..203adb5 100644
--- a/src/soc/amd/picasso/Makefile.inc
+++ b/src/soc/amd/picasso/Makefile.inc
@@ -69,7 +69,6 @@
ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi_util.c
ramstage-y += uart.c
ramstage-$(CONFIG_PICASSO_CONSOLE_UART) += uart_console.c
-ramstage-y += usb.c
ramstage-y += tsc_freq.c
ramstage-y += finalize.c
ramstage-y += soc_util.c
diff --git a/src/soc/amd/picasso/acpi/sb_pci0_fch.asl b/src/soc/amd/picasso/acpi/sb_pci0_fch.asl
index 7488b55..88d941f 100644
--- a/src/soc/amd/picasso/acpi/sb_pci0_fch.asl
+++ b/src/soc/amd/picasso/acpi/sb_pci0_fch.asl
@@ -27,8 +27,6 @@
Name(_ADR, 0x00140000)
} /* end SBUS */

-#include "usb.asl"
-
/* 0:14.2 - I2S Audio */

/* 0:14.3 - LPC */
diff --git a/src/soc/amd/picasso/acpi/usb.asl b/src/soc/amd/picasso/acpi/usb.asl
deleted file mode 100644
index f902100..0000000
--- a/src/soc/amd/picasso/acpi/usb.asl
+++ /dev/null
@@ -1,53 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-/* 0:12.0 - EHCI */
-Device(EHC0) {
- Name(_ADR, 0x00120000)
- Name(_PRW, Package() { 0xb, 3 })
- Device (RHUB) {
- Name (_ADR, Zero)
- Device (HS01) { Name (_ADR, 1) }
- Device (HS02) { Name (_ADR, 2) }
- Device (HS03) { Name (_ADR, 3) }
- Device (HS04) { Name (_ADR, 4) }
- Device (HS05) { Name (_ADR, 5) }
- Device (HS06) { Name (_ADR, 6) }
- Device (HS07) { Name (_ADR, 7) }
- Device (HS08) { Name (_ADR, 8) }
- }
-
- Method(_S0W,0) {
- Return(0)
- }
-
- Method(_S3W,0) {
- Return(4)
- }
-
- Method(_S4W,0) {
- Return(4)
- }
-} /* end EHC0 */
-
-
-/* 0:10.0 - XHCI 0*/
-Device(XHC0) {
- Name(_ADR, 0x00100000)
- Name(_PRW, Package() { 0xb, 3 })
- Device (SS01) { Name (_ADR, 1) }
- Device (SS02) { Name (_ADR, 2) }
- Device (SS03) { Name (_ADR, 3) }
-
- Method(_S0W,0) {
- Return(0)
- }
-
- Method(_S3W,0) {
- Return(4)
- }
-
- Method(_S4W,0) {
- Return(4)
- }
-
-} /* end XHC0 */
diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c
index 7d56323..8384541 100644
--- a/src/soc/amd/picasso/chip.c
+++ b/src/soc/amd/picasso/chip.c
@@ -30,23 +30,6 @@
if (dev->path.type == DEVICE_PATH_DOMAIN)
return "PCI0";

- if (dev->path.type == DEVICE_PATH_USB) {
- switch (dev->path.usb.port_type) {
- case 0:
- /* Root Hub */
- return "RHUB";
- case 3:
- /* USB3 ports */
- switch (dev->path.usb.port_id) {
- case 0: return "SS01";
- case 1: return "SS02";
- case 2: return "SS03";
- }
- break;
- }
- return NULL;
- }
-
if (dev->path.type != DEVICE_PATH_PCI)
return NULL;

@@ -67,20 +50,6 @@
}
}

- if (dev->bus->dev->path.type == DEVICE_PATH_PCI
- && dev->bus->dev->path.pci.devfn == PCIE_GPP_A_DEVFN) {
- switch (dev->path.pci.devfn) {
- case XHCI0_DEVFN:
- return "XHC0";
- case XHCI1_DEVFN:
- return "XHC1";
- default:
- printk(BIOS_WARNING, "Unknown Bus A PCI device: dev: %d, fn: %d\n",
- PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
- return NULL;
- }
- }
-
printk(BIOS_WARNING, "Unknown PCI device: dev: %d, fn: %d\n",
PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
return NULL;
diff --git a/src/soc/amd/picasso/usb.c b/src/soc/amd/picasso/usb.c
deleted file mode 100644
index 7b8c18c..0000000
--- a/src/soc/amd/picasso/usb.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <console/console.h>
-#include <device/device.h>
-#include <device/pci.h>
-#include <device/pci_ids.h>
-#include <device/pci_ops.h>
-#include <device/pci_ehci.h>
-#include <soc/acpi.h>
-#include <soc/pci_devs.h>
-#include <soc/southbridge.h>
-#include <amdblocks/acpimmio.h>
-
-static void picasso_usb_init(struct device *dev)
-{
- /* USB overcurrent configuration is programmed inside the FSP */
-
- printk(BIOS_DEBUG, "%s\n", __func__);
-}
-
-static struct device_operations usb_ops = {
- .read_resources = pci_dev_read_resources,
- .set_resources = pci_dev_set_resources,
- .enable_resources = pci_dev_enable_resources,
- .init = picasso_usb_init,
- .scan_bus = scan_static_bus,
- .acpi_name = soc_acpi_name,
- .ops_pci = &pci_dev_ops_pci,
-};
-
-static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI0,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL18H_XHCI1,
- PCI_DEVICE_ID_AMD_FAM17H_MODEL20H_XHCI0,
- 0
-};
-
-static const struct pci_driver usb_0_driver __pci_driver = {
- .ops = &usb_ops,
- .vendor = PCI_VENDOR_ID_AMD,
- .devices = pci_device_ids,
-};

To view, visit change 41901. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3e9973dd416ccd51971f4d9410bed991eb7c3c41
Gerrit-Change-Number: 41901
Gerrit-PatchSet: 11
Gerrit-Owner: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged