[Skiboot] [PATCH 03/33] POWER9: Make xscom_addr() work for p8 and p9

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Jun 25 08:47:26 AEST 2016


From: Michael Neuling <mikey at neuling.org>

Signed-off-by: Michael Neuling <mikey at neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/xscom.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/xscom.c b/hw/xscom.c
index 4d88ce5..d52d73d 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -64,9 +64,11 @@ static inline void *xscom_addr(uint32_t gcid, uint32_t pcb_addr)
 
 	assert(chip);
 	addr  = chip->xscom_base;
-	addr |= ((uint64_t)pcb_addr << 4) & ~0xfful;
-	addr |= (pcb_addr << 3) & 0x78;
-
+	if (proc_gen <= proc_gen_p8) {
+		addr |= ((uint64_t)pcb_addr << 4) & ~0xfful;
+		addr |= (pcb_addr << 3) & 0x78;
+	} else
+		addr |= ((uint64_t)pcb_addr << 3);
 	return (void *)addr;
 }
 
-- 
2.7.4



More information about the Skiboot mailing list