From c5316ec4d675750f35ff1b383adacc2255e92d79 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Fri, 29 May 2020 15:20:56 -0600 Subject: soc/intel/common/block: Add new block DTT Intel Dynamic Tuning Technology is the name of a PCI device on some Intel SoCs. This minimal PCI driver is only used now for SSDT generation on TGL devices. Change-Id: Ib52f35e4e020ca3e6ab8b32cc3bf7df36041926e Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/41893 Reviewed-by: Nick Vaccaro Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/dtt/Kconfig | 7 +++++++ src/soc/intel/common/block/dtt/Makefile.inc | 1 + src/soc/intel/common/block/dtt/dtt.c | 23 +++++++++++++++++++++++ src/soc/intel/tigerlake/Kconfig | 1 + 4 files changed, 32 insertions(+) create mode 100644 src/soc/intel/common/block/dtt/Kconfig create mode 100644 src/soc/intel/common/block/dtt/Makefile.inc create mode 100644 src/soc/intel/common/block/dtt/dtt.c (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/dtt/Kconfig b/src/soc/intel/common/block/dtt/Kconfig new file mode 100644 index 0000000000..063c475d53 --- /dev/null +++ b/src/soc/intel/common/block/dtt/Kconfig @@ -0,0 +1,7 @@ +config SOC_INTEL_COMMON_BLOCK_DTT + bool + default n + help + Minimal PCI Driver for enabling SSDT generation of Intel + Dynamic Tuning Technology (DTT) policies and controls, also + known as Intel DPTF (Dynamic Platform and Thermal Framework) diff --git a/src/soc/intel/common/block/dtt/Makefile.inc b/src/soc/intel/common/block/dtt/Makefile.inc new file mode 100644 index 0000000000..08f48c9e10 --- /dev/null +++ b/src/soc/intel/common/block/dtt/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_DTT) += dtt.c diff --git a/src/soc/intel/common/block/dtt/dtt.c b/src/soc/intel/common/block/dtt/dtt.c new file mode 100644 index 0000000000..14987ead0a --- /dev/null +++ b/src/soc/intel/common/block/dtt/dtt.c @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include + +static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_INTEL_TGL_DTT, +}; + +static struct device_operations dptf_dev_ops = { + .read_resources = pci_dev_read_resources, + .set_resources = pci_dev_set_resources, + .enable_resources = pci_dev_enable_resources, + .scan_bus = scan_generic_bus, + .ops_pci = &pci_dev_ops_pci, +}; + +static const struct pci_driver pch_dptf __pci_driver = { + .ops = &dptf_dev_ops, + .vendor = PCI_VENDOR_ID_INTEL, + .devices = pci_device_ids, +}; diff --git a/src/soc/intel/tigerlake/Kconfig b/src/soc/intel/tigerlake/Kconfig index c30519c2fa..091abb927f 100644 --- a/src/soc/intel/tigerlake/Kconfig +++ b/src/soc/intel/tigerlake/Kconfig @@ -45,6 +45,7 @@ config CPU_SPECIFIC_OPTIONS select SOC_INTEL_COMMON_BLOCK_CHIP_CONFIG select SOC_INTEL_COMMON_BLOCK_CPU select SOC_INTEL_COMMON_BLOCK_CPU_MPINIT + select SOC_INTEL_COMMON_BLOCK_DTT select SOC_INTEL_COMMON_BLOCK_GPIO_DUAL_ROUTE_SUPPORT select SOC_INTEL_COMMON_BLOCK_GSPI_VERSION_2 select SOC_INTEL_COMMON_BLOCK_HDA -- cgit v1.2.3