coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include <intelblocks/acpi.h>
7 #include <soc/pci_devs.h>
8 
9 static const char *usb4_xhci_acpi_name(const struct device *dev)
10 {
11  if (dev->path.type != DEVICE_PATH_PCI)
12  return NULL;
13 
14  return "TXHC";
15 }
16 
17 static struct device_operations usb4_xhci_ops = {
19  .set_resources = pci_dev_set_resources,
20  .enable_resources = pci_dev_enable_resources,
21  .ops_pci = &pci_dev_ops_pci,
22  .scan_bus = scan_static_bus,
23 #if CONFIG(HAVE_ACPI_TABLES)
24  .acpi_name = usb4_xhci_acpi_name,
25 #endif
26 };
27 
28 static const unsigned short pci_device_ids[] = {
35  0
36 };
37 
38 static const struct pci_driver usb4_xhci __pci_driver = {
39  .ops = &usb4_xhci_ops,
40  .vendor = PCI_VID_INTEL,
41  .devices = pci_device_ids,
42 };
@ DEVICE_PATH_PCI
Definition: path.h:9
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
#define PCI_DID_INTEL_TGP_H_TCSS_XHCI
Definition: pci_ids.h:4129
#define PCI_DID_INTEL_ADP_TCSS_XHCI
Definition: pci_ids.h:4134
#define PCI_DID_INTEL_MTL_P_TCSS_XHCI
Definition: pci_ids.h:4139
#define PCI_DID_INTEL_ADP_N_TCSS_XHCI
Definition: pci_ids.h:4135
#define PCI_DID_INTEL_MTL_M_TCSS_XHCI
Definition: pci_ids.h:4138
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
#define PCI_DID_INTEL_TGP_TCSS_XHCI
Definition: pci_ids.h:4127
void scan_static_bus(struct device *bus)
Definition: root_device.c:89
static const char * usb4_xhci_acpi_name(const struct device *dev)
Definition: xhci.c:9
static const unsigned short pci_device_ids[]
Definition: xhci.c:28
static struct device_operations usb4_xhci_ops
Definition: xhci.c:17
static const struct pci_driver usb4_xhci __pci_driver
Definition: xhci.c:38
#define NULL
Definition: stddef.h:19
void(* read_resources)(struct device *dev)
Definition: device.h:39
enum device_path_type type
Definition: path.h:114
Definition: device.h:107
struct device_path path
Definition: device.h:115