[Skiboot] [PATCH] phb4: Fix setting of max link speed

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Nov 11 08:07:29 AEDT 2016


Make sure we set consistent values between Init_4 and Init_14 and
set the default to Gen4 not Gen3

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/phb4.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 5c6b9c0..4454255 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2694,7 +2694,8 @@ static void phb4_init_hw(struct phb4 *p, bool first_init)
 	}
 
 	/* Init_14 - Clear link training */
-	phb4_pcicfg_write32(&p->phb, 0, 0x78, 0x0400FE07);
+	phb4_pcicfg_write32(&p->phb, 0, 0x78,
+			    0x0000FE07 | (p->max_link_speed << 24));
 
 	/* Init_15 - deassert cores reset */
 	/*
@@ -3063,7 +3064,7 @@ static void phb4_create(struct dt_node *np)
 	p->phb.ops = &phb4_ops;
 	p->phb.phb_type = phb_type_pcie_v4;
 	p->phb.scan_map = 0x1; /* Only device 0 to scan */
-	p->max_link_speed = dt_prop_get_u32_def(np, "ibm,max-link-speed", 3);
+	p->max_link_speed = dt_prop_get_u32_def(np, "ibm,max-link-speed", 4);
 	p->state = PHB4_STATE_UNINITIALIZED;
 
 	if (!phb4_calculate_windows(p))



More information about the Skiboot mailing list