From 2585a999bb9ce17870523d52184fcaa298b2f806 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 19 Dec 2022 21:31:49 +0530 Subject: [PATCH] soc/intel: Set `use_eisa_hids` based on `DPTF_USE_EISA_HID` config This patch avoids hardcoding to the `use_eisa_hids` variable instead relying on the SoC config to choose if the SoC platform supports EISA HID. If any SoC platform has the support then the `use_eisa_hids` variable would be set to `true` based on the selection of `DPTF_USE_EISA_HID` config. Note: Prior to Tiger Lake, all DPTF devices used 7-character EISA IDs. If selected, the 7-character _HIDs will be emitted, otherwise, it will use the "new" style, which are regular 8-character _HIDs. Ideally, the platform prior to Tiger Lake would set `use_eisa_hids` to `true` and platform posts that would set `use_eisa_hids` to `false`. Signed-off-by: Subrata Banik Change-Id: I869bebc8e17c1e65979ca3431308d69771a34fa3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71110 Reviewed-by: Eric Lai Reviewed-by: Sumeet R Pawnikar Reviewed-by: Tarun Tuli Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/soc/intel/alderlake/dptf.c | 2 +- src/soc/intel/apollolake/dptf.c | 2 +- src/soc/intel/cannonlake/dptf.c | 2 +- src/soc/intel/jasperlake/dptf.c | 2 +- src/soc/intel/tigerlake/dptf.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/soc/intel/alderlake/dptf.c b/src/soc/intel/alderlake/dptf.c index 0d4560b2c2..00f2e5ca80 100644 --- a/src/soc/intel/alderlake/dptf.c +++ b/src/soc/intel/alderlake/dptf.c @@ -4,7 +4,7 @@ #include static const struct dptf_platform_info adl_dptf_platform_info = { - .use_eisa_hids = false, + .use_eisa_hids = CONFIG(DPTF_USE_EISA_HID), /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ .dptf_device_hid = DPTF_DPTF_DEVICE, /* _HID for Intel DPTF Generic Device (these require PTYP as well) */ diff --git a/src/soc/intel/apollolake/dptf.c b/src/soc/intel/apollolake/dptf.c index a1ccb165a2..ba6cd59440 100644 --- a/src/soc/intel/apollolake/dptf.c +++ b/src/soc/intel/apollolake/dptf.c @@ -4,7 +4,7 @@ #include static const struct dptf_platform_info apl_dptf_platform_info = { - .use_eisa_hids = true, + .use_eisa_hids = CONFIG(DPTF_USE_EISA_HID), /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ .dptf_device_hid = DPTF_DPTF_DEVICE, /* _HID for Intel DPTF Generic Device (these require PTYP as well) */ diff --git a/src/soc/intel/cannonlake/dptf.c b/src/soc/intel/cannonlake/dptf.c index 54fac4c857..2ddcc9e2c4 100644 --- a/src/soc/intel/cannonlake/dptf.c +++ b/src/soc/intel/cannonlake/dptf.c @@ -4,7 +4,7 @@ #include static const struct dptf_platform_info cnl_dptf_platform_info = { - .use_eisa_hids = true, + .use_eisa_hids = CONFIG(DPTF_USE_EISA_HID), /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ .dptf_device_hid = DPTF_DPTF_DEVICE, /* _HID for Intel DPTF Generic Device (these require PTYP as well) */ diff --git a/src/soc/intel/jasperlake/dptf.c b/src/soc/intel/jasperlake/dptf.c index ef5291677a..5656fd7509 100644 --- a/src/soc/intel/jasperlake/dptf.c +++ b/src/soc/intel/jasperlake/dptf.c @@ -4,7 +4,7 @@ #include static const struct dptf_platform_info jsl_dptf_platform_info = { - .use_eisa_hids = true, + .use_eisa_hids = CONFIG(DPTF_USE_EISA_HID), /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ .dptf_device_hid = DPTF_DPTF_DEVICE, /* _HID for Intel DPTF Generic Device (these require PTYP as well) */ diff --git a/src/soc/intel/tigerlake/dptf.c b/src/soc/intel/tigerlake/dptf.c index 15626d97e2..ad3b7175e8 100644 --- a/src/soc/intel/tigerlake/dptf.c +++ b/src/soc/intel/tigerlake/dptf.c @@ -5,7 +5,7 @@ #include static const struct dptf_platform_info tgl_dptf_platform_info = { - .use_eisa_hids = false, + .use_eisa_hids = CONFIG(DPTF_USE_EISA_HID), /* _HID for the toplevel DPTF device, typically \_SB.DPTF */ .dptf_device_hid = DPTF_DPTF_DEVICE, /* _HID for Intel DPTF Generic Device (these require PTYP as well) */