mb/google/poppy/variants/nami: Perform PL2 setting for sona

According to sona thermal table, PL2 need to check cpu id.
And then set PL2 value.

BUG=b:110867809
TEST=The thermal team verify OK

Change-Id: I5759fb3c685e3d4eef1be054541f950843d19874
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/27260
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>
This commit is contained in:
John Su 2018-06-28 14:29:23 +08:00 committed by Furquan Shaikh
parent 0a36c2ce15
commit bac90c00b1
1 changed files with 9 additions and 2 deletions

View File

@ -31,9 +31,16 @@
#define PL2_I7_SKU 44
#define PL2_DEFAULT 29
#define PL2_KBL_R 25
static uint32_t get_pl2(void)
static uint32_t get_pl2(uint32_t sku_id)
{
if ((sku_id == SKU_0_SONA) || (sku_id == SKU_1_SONA)) {
if (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
return PL2_DEFAULT;
return PL2_KBL_R;
}
if (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
return PL2_I7_SKU;
@ -62,7 +69,7 @@ void variant_devtree_update(void)
config_t *cfg = root->chip_info;
/* Update PL2 based on SKU. */
cfg->tdp_pl2_override = get_pl2();
cfg->tdp_pl2_override = get_pl2(sku_id);
switch (sku_id) {
case SKU_0_VAYNE: