Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/29035
Change subject: amd/stoneyridge: Indicate STAPM units in their name ......................................................................
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 --- M src/mainboard/google/kahlee/variants/careena/devicetree.cb M src/mainboard/google/kahlee/variants/grunt/devicetree.cb M src/soc/amd/stoneyridge/chip.h M src/soc/amd/stoneyridge/romstage.c 4 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/29035/1
diff --git a/src/mainboard/google/kahlee/variants/careena/devicetree.cb b/src/mainboard/google/kahlee/variants/careena/devicetree.cb index ad760b5..b541c03 100644 --- a/src/mainboard/google/kahlee/variants/careena/devicetree.cb +++ b/src/mainboard/google/kahlee/variants/careena/devicetree.cb @@ -21,8 +21,8 @@ register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" register "uma_size" = "32 * MiB" register "stapm_percent" = "68" - register "stapm_time" = "2500000" - register "stapm_power" = "7800" + register "stapm_time_ms" = "2500000" + register "stapm_power_mw" = "7800"
# Enable I2C0 for audio, USB3 hub at 400kHz register "i2c[0]" = "{ diff --git a/src/mainboard/google/kahlee/variants/grunt/devicetree.cb b/src/mainboard/google/kahlee/variants/grunt/devicetree.cb index 8af3f9c..5a8906b 100644 --- a/src/mainboard/google/kahlee/variants/grunt/devicetree.cb +++ b/src/mainboard/google/kahlee/variants/grunt/devicetree.cb @@ -21,8 +21,8 @@ register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" register "uma_size" = "32 * MiB" register "stapm_percent" = "80" - register "stapm_time" = "2500000" - register "stapm_power" = "7800" + register "stapm_time_ms" = "2500000" + register "stapm_power_mw" = "7800"
# Enable I2C0 for audio, USB3 hub at 400kHz register "i2c[0]" = "{ diff --git a/src/soc/amd/stoneyridge/chip.h b/src/soc/amd/stoneyridge/chip.h index 8ed8e4d..320bef0 100644 --- a/src/soc/amd/stoneyridge/chip.h +++ b/src/soc/amd/stoneyridge/chip.h @@ -61,8 +61,8 @@ u8 i2c_scl_reset; struct dw_i2c_bus_config i2c[STONEY_I2C_DEV_MAX]; u8 stapm_percent; - u32 stapm_time; - u32 stapm_power; + u32 stapm_time_ms; + u32 stapm_power_mw; };
typedef struct soc_amd_stoneyridge_config config_t; diff --git a/src/soc/amd/stoneyridge/romstage.c b/src/soc/amd/stoneyridge/romstage.c index 555e901..3fae6c4 100644 --- a/src/soc/amd/stoneyridge/romstage.c +++ b/src/soc/amd/stoneyridge/romstage.c @@ -235,12 +235,12 @@ } 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; } }