diff options
author | Richard Spiegel <richard.spiegel@amd.corp-partner.google.com> | 2018-10-11 08:15:43 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-10-11 21:04:10 +0000 |
commit | de5d04011cb2f3de4e93381d58a4d01d5682a3f9 (patch) | |
tree | c95e5b9f657ef1a0807c536b90b8e32e1468e806 /src/soc/amd/stoneyridge/romstage.c | |
parent | f9735dc760e11136fb0a1623b3ec5a51399d3cab (diff) | |
download | coreboot-de5d04011cb2f3de4e93381d58a4d01d5682a3f9.tar.xz |
amd/stoneyridge: Indicate STAPM units in their name
STAPM devicetree registers do not indicate the unit, which causes confusion.
More importantly, the time was assumed to be in seconds when it's actually
milliseconds. This caused early STAPM configurations to fail.
BUG=b:117590953
TEST=Build grunt
Change-Id: I2a7e3d43601992d1f7b02456913c763d940fe9ee
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/29035
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge/romstage.c')
-rw-r--r-- | src/soc/amd/stoneyridge/romstage.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/soc/amd/stoneyridge/romstage.c b/src/soc/amd/stoneyridge/romstage.c index 555e901501..ed83e1ee1d 100644 --- a/src/soc/amd/stoneyridge/romstage.c +++ b/src/soc/amd/stoneyridge/romstage.c @@ -235,12 +235,13 @@ void soc_customize_init_early(AMD_EARLY_PARAMS *InitEarly) } cfg = dev->chip_info; platform = &InitEarly->PlatformConfig; - if ((cfg->stapm_percent) && (cfg->stapm_time) && (cfg->stapm_power)) { + if ((cfg->stapm_percent) && (cfg->stapm_time_ms) && + (cfg->stapm_power_mw)) { platform->PlatStapmConfig.CfgStapmScalar = cfg->stapm_percent; platform->PlatStapmConfig.CfgStapmTimeConstant = - cfg->stapm_time; - platform->PkgPwrLimitDC = cfg->stapm_power; - platform->PkgPwrLimitAC = cfg->stapm_power; + cfg->stapm_time_ms; + platform->PkgPwrLimitDC = cfg->stapm_power_mw; + platform->PkgPwrLimitAC = cfg->stapm_power_mw; platform->PlatStapmConfig.CfgStapmBoost = StapmBoostEnabled; } } |