[coreboot-gerrit] Change in coreboot[master]: mb/google/poppy/variants/nami: Perform PL2 setting for sona different...

John Su (Code Review) gerrit at coreboot.org
Thu Jun 28 08:32:18 CEST 2018


John Su has uploaded this change for review. ( https://review.coreboot.org/27260


Change subject: mb/google/poppy/variants/nami: Perform PL2 setting for sona different cpu model
......................................................................

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

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

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

Change-Id: I5759fb3c685e3d4eef1be054541f950843d19874
Signed-off-by: John Su <john_su at compal.corp-partner.google.com>
---
M src/mainboard/google/poppy/variants/nami/mainboard.c
1 file changed, 13 insertions(+), 5 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/27260/1

diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c
index 1d5a0b2..e0b89ee 100644
--- a/src/mainboard/google/poppy/variants/nami/mainboard.c
+++ b/src/mainboard/google/poppy/variants/nami/mainboard.c
@@ -31,13 +31,21 @@
 
 #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 (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
-		return PL2_I7_SKU;
+	if ((sku_id == SKU_0_SONA) | (sku_id == SKU_1_SONA)) {
+		if (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
+			return PL2_DEFAULT;
 
-	return PL2_DEFAULT;
+		return PL2_KBL_R;
+	} else {
+		if (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
+			return PL2_I7_SKU;
+
+		return PL2_DEFAULT;
+	}
 }
 
 uint32_t variant_board_sku(void)
@@ -62,7 +70,7 @@
 	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:

-- 
To view, visit https://review.coreboot.org/27260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5759fb3c685e3d4eef1be054541f950843d19874
Gerrit-Change-Number: 27260
Gerrit-PatchSet: 1
Gerrit-Owner: John Su <john_su at compal.corp-partner.google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180628/4b48c5d6/attachment.html>


More information about the coreboot-gerrit mailing list