aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-09-23 11:00:20 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-09-23 11:00:20 +1000
commit22766a6661b1cd2ce8c54a11a4be62d9149f6f77 (patch)
treed55edf23dc3f96d5ec1f6786c4937d09971192d7
parent187af5025e5a8517d4d801248a89420ff23c9f4b (diff)
downloadskiboot-22766a6661b1cd2ce8c54a11a4be62d9149f6f77.zip
skiboot-22766a6661b1cd2ce8c54a11a4be62d9149f6f77.tar.gz
skiboot-22766a6661b1cd2ce8c54a11a4be62d9149f6f77.tar.bz2
psi: Workaround for "pulse" external interrupt
The FPGA used on some open power machines generates regular pulses instead of levels. In that case, reading the status might fail since it's not latched. In that case, also check the latched event bit in the XIVR. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--hw/psi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/psi.c b/hw/psi.c
index eb4eac1..42eac39 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -287,6 +287,18 @@ static void handle_extra_interrupt(struct psi *psi)
if (val & PSIHB_IRQ_STAT_HOST_ERR) {
if (platform.external_irq)
platform.external_irq(psi->chip_id);
+ } else {
+ u64 xivr;
+
+ /*
+ * The way our FPGA "pulses" the external interrupt
+ * on BMC machines means we might not see it in the
+ * status register anymore, so look at the latch in
+ * the XIVR
+ */
+ xivr = in_be64(psi->regs + PSIHB_XIVR_HOST_ERR);
+ if (xivr & PPC_BIT(39) && platform.external_irq)
+ platform.external_irq(psi->chip_id);
}
/*