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[] = { |
Bora Guvendik | a15b25f | 2022-02-28 14:43:49 -0800 | [diff] [blame] | 29 | PCI_DID_INTEL_RPP_P_TCSS_XHCI, |
Wonkyu Kim | 9f40107 | 2020-11-13 15:16:32 -0800 | [diff] [blame] | 30 | PCI_DID_INTEL_MTL_M_TCSS_XHCI, |
| 31 | PCI_DID_INTEL_MTL_P_TCSS_XHCI, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 32 | PCI_DID_INTEL_TGP_TCSS_XHCI, |
| 33 | PCI_DID_INTEL_TGP_H_TCSS_XHCI, |
| 34 | PCI_DID_INTEL_ADP_TCSS_XHCI, |
Maulik V Vaghela | 85a09ef | 2022-03-21 14:06:44 +0530 | [diff] [blame] | 35 | PCI_DID_INTEL_ADP_N_TCSS_XHCI, |
Duncan Laurie | 0f5a17e | 2020-10-27 10:26:18 -0700 | [diff] [blame] | 36 | 0 |
| 37 | }; |
| 38 | |
| 39 | static const struct pci_driver usb4_xhci __pci_driver = { |
| 40 | .ops = &usb4_xhci_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 41 | .vendor = PCI_VID_INTEL, |
Duncan Laurie | 0f5a17e | 2020-10-27 10:26:18 -0700 | [diff] [blame] | 42 | .devices = pci_device_ids, |
| 43 | }; |