diff options
author | John Su <john_su@compal.corp-partner.google.com> | 2018-06-28 14:29:23 +0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2018-07-02 06:30:28 +0000 |
commit | bac90c00b105a182933988bf2b589675af23a2a7 (patch) | |
tree | 46c194ccd752160001b9746e17c3d3adbbd0ce22 /src | |
parent | 0a36c2ce15fd44e03e78a8805e6cc30fb5a7b67c (diff) | |
download | coreboot-bac90c00b105a182933988bf2b589675af23a2a7.tar.xz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/poppy/variants/nami/mainboard.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c index 1d5a0b2ec5..33d6bf3671 100644 --- a/src/mainboard/google/poppy/variants/nami/mainboard.c +++ b/src/mainboard/google/poppy/variants/nami/mainboard.c @@ -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: |