[Skiboot] [PATCH 02/21] psi: Fix P9 BAR setup on multi-chips
Benjamin Herrenschmidt
benh at kernel.crashing.org
Mon Nov 14 13:06:02 AEDT 2016
We need to inject the chip id in the MMIO address
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
hw/psi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/psi.c b/hw/psi.c
index 503e1ce..a7ea12c 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -764,8 +764,9 @@ static void psi_init_p9_interrupts(struct psi *psi)
/* Configure the CI BAR if necessary */
val = in_be64(psi->regs + PSIHB_ESB_CI_BASE);
if (!(val & PSIHB_ESB_CI_VALID)) {
- out_be64(psi->regs + PSIHB_ESB_CI_BASE,
- PSIHB_ESB_MMIO_DEFAULT | PSIHB_ESB_CI_VALID);
+ val = PSIHB_ESB_MMIO_DEFAULT | PSIHB_ESB_CI_VALID;
+ val |= (0x40000000000ull * (uint64_t)psi->chip_id);
+ out_be64(psi->regs + PSIHB_ESB_CI_BASE, val);
printf("PSI[0x%03x]: ESB MMIO invalid, reconfiguring...\n",
psi->chip_id);
}
@@ -973,6 +974,7 @@ static struct psi *psi_probe_p9(struct proc_chip *chip, u64 base)
chip->id, val);
#define PSIHB_PSI_MMIO_DEFAULT 0x006030203000000ull
val = PSIHB_PSI_MMIO_DEFAULT | PSIHB_XSCOM_P9_HBBAR_EN;
+ val |= (0x40000000000ull * (uint64_t)chip->id);
xscom_write(chip->id, base + PSIHB_XSCOM_P9_BASE, val);
}
psi = alloc_psi(chip, base);
--
2.7.4
More information about the Skiboot
mailing list