summaryrefslogtreecommitdiffstats
path: root/src/soc/intel
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2021-04-09 12:15:21 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-04-13 08:22:49 +0000
commit7f7c3882a6ac776ba215551a3c5cd9a7379933b5 (patch)
tree49e5a36cecd0a05a34a2600102156f7381195472 /src/soc/intel
parent24ea3f3364711f352a8a174e6fc0f22885725ed5 (diff)
downloadcoreboot-7f7c3882a6ac776ba215551a3c5cd9a7379933b5.tar.gz
coreboot-7f7c3882a6ac776ba215551a3c5cd9a7379933b5.tar.bz2
coreboot-7f7c3882a6ac776ba215551a3c5cd9a7379933b5.zip
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 <twawrzynczak@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52220 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/cannonlake/Makefile.inc1
-rw-r--r--src/soc/intel/cannonlake/dptf.c18
-rw-r--r--src/soc/intel/jasperlake/Makefile.inc1
-rw-r--r--src/soc/intel/jasperlake/dptf.c18
-rw-r--r--src/soc/intel/tigerlake/Makefile.inc1
-rw-r--r--src/soc/intel/tigerlake/dptf.c18
6 files changed, 57 insertions, 0 deletions
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc
index dc1bcf03e772..99a6bac2cac1 100644
--- a/src/soc/intel/cannonlake/Makefile.inc
+++ b/src/soc/intel/cannonlake/Makefile.inc
@@ -32,6 +32,7 @@ romstage-y += uart.c
ramstage-y += acpi.c
ramstage-y += chip.c
ramstage-y += cpu.c
+ramstage-y += dptf.c
ramstage-y += elog.c
ramstage-y += finalize.c
ramstage-y += fsp_params.c
diff --git a/src/soc/intel/cannonlake/dptf.c b/src/soc/intel/cannonlake/dptf.c
new file mode 100644
index 000000000000..d84285871205
--- /dev/null
+++ b/src/soc/intel/cannonlake/dptf.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <drivers/intel/dptf/dptf.h>
+
+static const struct dptf_platform_info cnl_dptf_platform_info = {
+ .use_eisa_hids = true,
+ /* _HID for the toplevel DPTF device, typically \_SB.DPTF */
+ .dptf_device_hid = "INT3400",
+ /* _HID for Intel DPTF Generic Device (these require PTYP as well) */
+ .generic_hid = "INT3403",
+ /* _HID for Intel DPTF Fan Device */
+ .fan_hid = "INT3404",
+};
+
+const struct dptf_platform_info *get_dptf_platform_info(void)
+{
+ return &cnl_dptf_platform_info;
+}
diff --git a/src/soc/intel/jasperlake/Makefile.inc b/src/soc/intel/jasperlake/Makefile.inc
index d570cc81d5b2..c4b5fedba9e6 100644
--- a/src/soc/intel/jasperlake/Makefile.inc
+++ b/src/soc/intel/jasperlake/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/jasperlake/dptf.c b/src/soc/intel/jasperlake/dptf.c
new file mode 100644
index 000000000000..be6804cd45a2
--- /dev/null
+++ b/src/soc/intel/jasperlake/dptf.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <drivers/intel/dptf/dptf.h>
+
+static const struct dptf_platform_info jsl_dptf_platform_info = {
+ .use_eisa_hids = true,
+ /* _HID for the toplevel DPTF device, typically \_SB.DPTF */
+ .dptf_device_hid = "INT3400",
+ /* _HID for Intel DPTF Generic Device (these require PTYP as well) */
+ .generic_hid = "INT3403",
+ /* _HID for Intel DPTF Fan Device */
+ .fan_hid = "INT3404",
+};
+
+const struct dptf_platform_info *get_dptf_platform_info(void)
+{
+ return &jsl_dptf_platform_info;
+}
diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc
index 572b96ee562d..ae6101d88007 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 000000000000..2f0427e6c755
--- /dev/null
+++ b/src/soc/intel/tigerlake/dptf.c
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <drivers/intel/dptf/dptf.h>
+
+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;
+}