aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuluTHSu <Lulu_Su@wistron.com>2020-12-09 16:40:54 +0800
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-01-06 16:58:02 +0530
commit240073ffa049b38ee0810ae996436a2b34a051c1 (patch)
treef122e8dbb4216c22a960df0c9cb2faa0078fa2a6
parentbd136e7df7ba93a9283af6b8c82b949367693521 (diff)
downloadskiboot-240073ffa049b38ee0810ae996436a2b34a051c1.zip
skiboot-240073ffa049b38ee0810ae996436a2b34a051c1.tar.gz
skiboot-240073ffa049b38ee0810ae996436a2b34a051c1.tar.bz2
platform/mowgli: Limit PHB0/(pec0) to gen3 speed
[ Upstream commit 127a3ee2417a2a71b63cca5fd7055d9b64939bb1 ] Use the method provided by Frederic: Add the "ibm, maximum link speed" attribute to the PHB device tree at index 0. The phb4.c code will looks for it and set up the link correctly. Signed-off-by: LuluTHSu <Lulu_Su@wistron.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r--platforms/astbmc/mowgli.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/platforms/astbmc/mowgli.c b/platforms/astbmc/mowgli.c
index 213d734..df83319 100644
--- a/platforms/astbmc/mowgli.c
+++ b/platforms/astbmc/mowgli.c
@@ -49,6 +49,21 @@ static void vpd_dt_fixup(void)
}
}
+static void phb0_fixup(void)
+{
+ struct dt_node *stk;
+ u32 phb_index;
+
+ /* Limit PHB0/(pec0) to gen3 speed */
+ dt_for_each_compatible(dt_root, stk, "ibm,power9-phb-stack") {
+ phb_index = dt_prop_get_u32_def(stk, "ibm,phb-index", -1);
+ if (phb_index == 0) {
+ dt_check_del_prop(stk, "ibm,max-link-speed");
+ dt_add_property_cells(stk, "ibm,max-link-speed", 3);
+ }
+ }
+}
+
static bool mowgli_probe(void)
{
if (!dt_node_is_compatible(dt_root, "ibm,mowgli"))
@@ -63,6 +78,7 @@ static bool mowgli_probe(void)
vpd_dt_fixup();
slot_table_init(mowgli_phb_table);
+ phb0_fixup();
return true;
}