diff mbox series

[2/2] hw/phb4.c: limit the max-link-speed of Mowgli's phb0 to gen3

Message ID 20201028104621.26677-2-Lulu_Su@wistron.com
State Rejected
Headers show
Series [1/2] platform/mowgli: modify slot_name | expand

Commit Message

Lulu Su Oct. 28, 2020, 10:46 a.m. UTC
From: LuluTHSu <Lulu_Su@wistron.com>

Add a condition in phb4_get_max_link_speed(),
when it's mowgli's phb0, max-link-speed is set to gen3.
For mowgli platform spec.

Cc: skiboot-stable@lists.ozlabs.org
Signed-off-by: LuluTHSu <Lulu_Su@wistron.com>
---
 hw/phb4.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index 17a233f..ef6b176 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2966,6 +2966,10 @@  static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np)
 
 	/* Priority order: NVRAM -> dt -> GEN3 dd2.00 -> GEN4 */
 	max_link_speed = 4;
+	if(dt_node_is_compatible(dt_root,"ibm,mowgli") && p->pec==0){
+		max_link_speed = 3;
+		prlog(PR_DEBUG, "Set the max link speed of Mowgli phb0 to gen3\n");
+	}
 	if (p->rev == PHB4_REV_NIMBUS_DD20 &&
 	    ((0xf & chip->ec_level) == 0) && chip->ec_rev == 0)
 		max_link_speed = 3;