From 7f7c3882a6ac776ba215551a3c5cd9a7379933b5 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Fri, 9 Apr 2021 12:15:21 -0600 Subject: dptf: Move platform-specific information to `struct dptf_platform_info` DPTF HIDs are different per-platform going forward, so refactor these into SoC-specific structures which the DPTF driver can query at runtime for platform-specific information. Change-Id: I6307f9d28f4274b851323ad69180ff4ae35053da Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/52220 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Sumeet R Pawnikar --- src/soc/intel/tigerlake/Makefile.inc | 1 + src/soc/intel/tigerlake/dptf.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/soc/intel/tigerlake/dptf.c (limited to 'src/soc/intel/tigerlake') diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index 572b96ee56..ae6101d880 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -30,6 +30,7 @@ romstage-y += reset.c ramstage-y += acpi.c ramstage-y += chip.c ramstage-y += cpu.c +ramstage-y += dptf.c ramstage-y += elog.c ramstage-y += espi.c ramstage-y += finalize.c diff --git a/src/soc/intel/tigerlake/dptf.c b/src/soc/intel/tigerlake/dptf.c new file mode 100644 index 0000000000..2f0427e6c7 --- /dev/null +++ b/src/soc/intel/tigerlake/dptf.c @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +static const struct dptf_platform_info tgl_dptf_platform_info = { + .use_eisa_hids = false, + /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ + .dptf_device_hid = "INTC1040", + /* _HID for Intel DPTF Generic Device (these require PTYP as well) */ + .generic_hid = "INTC1043", + /* _HID for Intel DPTF Fan Device */ + .fan_hid = "INTC1044", +}; + +const struct dptf_platform_info *get_dptf_platform_info(void) +{ + return &tgl_dptf_platform_info; +} -- cgit v1.2.3