[Skiboot] [PATCH] phb4: Fix endian issue with link control2/status2 registers

Michael Neuling mikey at neuling.org
Sun Jan 8 08:49:05 AEDT 2017


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>

Fixes training at larger than PCIe Gen1 speeds.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 hw/phb4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 981c16de7e..e1ff10c379 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2701,7 +2701,7 @@ static void phb4_init_hw(struct phb4 *p, bool first_init)
 
 	/* Init_14 - Clear link training */
 	phb4_pcicfg_write32(&p->phb, 0, 0x78,
-			    0x0000FE07 | (p->max_link_speed << 24));
+			    0x07FE0000 | p->max_link_speed);
 
 	/* Init_15 - deassert cores reset */
 	/*
-- 
2.9.3



More information about the Skiboot mailing list