diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-05-07 19:17:51 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-05-08 18:04:08 +0000 |
commit | 3acafa20105858ef278ece2ddb7f1e577bba8620 (patch) | |
tree | 8d0aad59ec3a9400229c702bd6fd6132e424cd91 /src/soc | |
parent | ef51157e52cf27a2173a72d6faed19893bb0911f (diff) |
soc/amd/picasso,common: move ALIB DPTC IDs to common code
These parameter IDs are defined in the AGESA Interface specification
#55483. This patch also adds a ALIB_DPTC_ prefix to the IDs and makes
the names more consistent.
TEST=Timeless build for Mandolin results in identical binary.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I75e0504f6274ad50c53faa8fcbde4d6821d85a04
Reviewed-on: https://review.coreboot.org/c/coreboot/+/53917
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/alib.h | 12 | ||||
-rw-r--r-- | src/soc/amd/picasso/root_complex.c | 47 |
2 files changed, 32 insertions, 27 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/alib.h b/src/soc/amd/common/block/include/amdblocks/alib.h index a59ba8b153..e11b1ae95b 100644 --- a/src/soc/amd/common/block/include/amdblocks/alib.h +++ b/src/soc/amd/common/block/include/amdblocks/alib.h @@ -6,4 +6,16 @@ #define ALIB_FUNCTION_REPORT_AC_DC_STATE 0x1 #define ALIB_FUNCTION_DYNAMIC_POWER_THERMAL_CONFIG 0xc +#ifndef __ACPI__ + +/* parameter IDs for the ALIB_FUNCTION_DYNAMIC_POWER_THERMAL_CONFIG function */ +enum alib_dptc_parameter_ids { + ALIB_DPTC_THERMAL_CONTROL_LIMIT_ID = 0x3, + ALIB_DPTC_SUSTAINED_POWER_LIMIT_ID = 0x5, + ALIB_DPTC_FAST_PPT_LIMIT_ID = 0x6, + ALIB_DPTC_SLOW_PPT_LIMIT_ID = 0x7, +}; + +#endif /* !__ACPI__ */ + #endif /* AMD_COMMON_ALIB_H */ diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index 932ca766b2..c0b444fa36 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -18,13 +18,6 @@ #include <soc/iomap.h> #include "chip.h" -enum { - THERMAL_CONTROL_LIMIT_ID = 0x3, - SUSTAINED_POWER_LIMIT_PARAM_ID = 0x5, - FAST_PPT_LIMIT_PARAM_ID = 0x6, - SLOW_PPT_LIMIT_PARAM_ID = 0x7, -}; - #define DPTC_TOTAL_UPDATE_PARAMS 4 struct dptc_param { @@ -38,27 +31,27 @@ struct dptc_input { } __packed; #define DPTC_INPUTS(_thermctllmit, _sustained, _fast, _slow) \ - { \ - .size = sizeof(struct dptc_input), \ - .params = { \ - { \ - .id = THERMAL_CONTROL_LIMIT_ID, \ - .value = _thermctllmit, \ - }, \ - { \ - .id = SUSTAINED_POWER_LIMIT_PARAM_ID, \ - .value = _sustained, \ - }, \ - { \ - .id = FAST_PPT_LIMIT_PARAM_ID, \ - .value = _fast, \ - }, \ - { \ - .id = SLOW_PPT_LIMIT_PARAM_ID, \ - .value = _slow, \ - }, \ + { \ + .size = sizeof(struct dptc_input), \ + .params = { \ + { \ + .id = ALIB_DPTC_THERMAL_CONTROL_LIMIT_ID, \ + .value = _thermctllmit, \ + }, \ + { \ + .id = ALIB_DPTC_SUSTAINED_POWER_LIMIT_ID, \ + .value = _sustained, \ }, \ - } + { \ + .id = ALIB_DPTC_FAST_PPT_LIMIT_ID, \ + .value = _fast, \ + }, \ + { \ + .id = ALIB_DPTC_SLOW_PPT_LIMIT_ID, \ + .value = _slow, \ + }, \ + }, \ + } /* * * +--------------------------------+ |