blob: ba6b83f1acac0e015543f562b6c5c187879e8f91 [file] [log] [blame]
Duncan Laurie0f5a17e2020-10-27 10:26:18 -07001/* 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
9static 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
17static struct device_operations usb4_xhci_ops = {
18 .read_resources = pci_dev_read_resources,
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
28static const unsigned short pci_device_ids[] = {
Felix Singer43b7f412022-03-07 04:34:52 +010029 PCI_DID_INTEL_TGP_TCSS_XHCI,
30 PCI_DID_INTEL_TGP_H_TCSS_XHCI,
31 PCI_DID_INTEL_ADP_TCSS_XHCI,
Duncan Laurie0f5a17e2020-10-27 10:26:18 -070032 0
33};
34
35static const struct pci_driver usb4_xhci __pci_driver = {
36 .ops = &usb4_xhci_ops,
Felix Singer43b7f412022-03-07 04:34:52 +010037 .vendor = PCI_VID_INTEL,
Duncan Laurie0f5a17e2020-10-27 10:26:18 -070038 .devices = pci_device_ids,
39};