libpayload: configs: Add new config.featuretest to broaden CI
[coreboot.git] / src / soc / intel / common / block / dtt / dtt.c
blob1d7033549108f644fb88d83c445e0d067148a819
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <acpi/acpigen.h>
4 #include <acpi/acpigen_pci.h>
5 #include <device/device.h>
6 #include <device/pci.h>
7 #include <device/pci_ids.h>
8 #include <intelblocks/acpi.h>
10 static const unsigned short pci_device_ids[] = {
11 PCI_DID_INTEL_RPL_DTT,
12 PCI_DID_INTEL_MTL_DTT,
13 PCI_DID_INTEL_CML_DTT,
14 PCI_DID_INTEL_TGL_DTT,
15 PCI_DID_INTEL_JSL_DTT,
16 PCI_DID_INTEL_ADL_DTT,
20 static void dtt_acpi_fill_ssdt(const struct device *dev)
22 /* Skip if DPTF driver in use since TCPU device will already exist */
23 if (CONFIG(DRIVERS_INTEL_DPTF))
24 return;
26 const char *scope = acpi_device_scope(dev);
28 if (!scope)
29 return;
31 acpigen_write_scope(scope);
32 acpigen_write_device(soc_acpi_name(dev));
33 acpigen_write_ADR_pci_device(dev);
34 acpigen_write_STA(acpi_device_status(dev));
35 acpigen_pop_len(); /* Device */
36 acpigen_pop_len(); /* Scope */
39 static struct device_operations dptf_dev_ops = {
40 .read_resources = pci_dev_read_resources,
41 .set_resources = pci_dev_set_resources,
42 .enable_resources = pci_dev_enable_resources,
43 .scan_bus = scan_generic_bus,
44 .ops_pci = &pci_dev_ops_pci,
45 #if CONFIG(HAVE_ACPI_TABLES)
46 .acpi_fill_ssdt = dtt_acpi_fill_ssdt,
47 #endif
50 static const struct pci_driver pch_dptf __pci_driver = {
51 .ops = &dptf_dev_ops,
52 .vendor = PCI_VID_INTEL,
53 .devices = pci_device_ids,