Duncan Laurie | 0f5a17e | 2020-10-27 10:26:18 -0700 | [diff] [blame] | 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 = { |
| 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 | |
| 28 | static const unsigned short pci_device_ids[] = { |
| 29 | PCI_DEVICE_ID_INTEL_TGP_TCSS_XHCI, |
V Sowmya | 2c9d65b | 2020-12-03 23:15:37 +0530 | [diff] [blame^] | 30 | PCI_DEVICE_ID_INTEL_ADP_TCSS_XHCI, |
Duncan Laurie | 0f5a17e | 2020-10-27 10:26:18 -0700 | [diff] [blame] | 31 | 0 |
| 32 | }; |
| 33 | |
| 34 | static const struct pci_driver usb4_xhci __pci_driver = { |
| 35 | .ops = &usb4_xhci_ops, |
| 36 | .vendor = PCI_VENDOR_ID_INTEL, |
| 37 | .devices = pci_device_ids, |
| 38 | }; |