summaryrefslogtreecommitdiff
path: root/src/drivers/usb/pci_xhci/pci_xhci.h
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2020-05-29 17:18:12 -0600
committerFelix Held <felix-coreboot@felixheld.de>2020-07-10 23:32:16 +0000
commit1a31b103c7a86a0cee958116083a896f0ac5e45e (patch)
treeea05a743c6f65b5bfc0cc1f313a2312b87e2a0ad /src/drivers/usb/pci_xhci/pci_xhci.h
parentfc06af867e77d905ba7ad442e70b13c9893d7aa2 (diff)
downloadcoreboot-1a31b103c7a86a0cee958116083a896f0ac5e45e.tar.xz
drivers/usb/pci_xhci: Add a driver to generate xHCI ACPI nodes
We can use xhci_for_each_ext_cap to inspect the xHC so we generate the correct number of device nodes. Scope (\_SB.PCI0.PBRA) { Device (XHC1) { Name (_ADR, 0x0000000000000004) // _ADR: Address Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) } Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x1F, 0x03 }) Device (RHUB) { Name (_ADR, Zero) // _ADR: Address Device (HS01) { Name (_ADR, 0x01) // _ADR: Address } Device (HS02) { Name (_ADR, 0x02) // _ADR: Address } Device (SS01) { Name (_ADR, 0x03) // _ADR: Address } } Name (_S0W, Zero) // _S0W: S0 Device Wake State Name (_S3W, 0x04) // _S3W: S3 Device Wake State Name (_S4W, 0x04) // _S4W: S4 Device Wake State } } BUG=b:154756391 TEST=Boot trembyle and look at ACPI table. See all xHCI nodes. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I44ebaef342e45923bc181ceebef882358d33f0d1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41900 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/usb/pci_xhci/pci_xhci.h')
-rw-r--r--src/drivers/usb/pci_xhci/pci_xhci.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/drivers/usb/pci_xhci/pci_xhci.h b/src/drivers/usb/pci_xhci/pci_xhci.h
new file mode 100644
index 0000000000..a923351ac2
--- /dev/null
+++ b/src/drivers/usb/pci_xhci/pci_xhci.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __DRIVERS_USB_PCI_XHCI__
+#define __DRIVERS_USB_PCI_XHCI__
+
+#include <commonlib/bsd/cb_err.h>
+#include <device/device.h>
+
+/*
+ * Returns the wake GPE for the Extensible Host Controller.
+ * Set gpe to -1 if there is no GPE is available.
+ */
+enum cb_err pci_xhci_get_wake_gpe(const struct device *dev, int *gpe);
+
+#endif /* __DRIVERS_USB_PCI_XHCI__ */