diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-09-23 11:00:20 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-09-23 11:00:20 +1000 |
commit | 22766a6661b1cd2ce8c54a11a4be62d9149f6f77 (patch) | |
tree | d55edf23dc3f96d5ec1f6786c4937d09971192d7 /hw | |
parent | 187af5025e5a8517d4d801248a89420ff23c9f4b (diff) | |
download | skiboot-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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/psi.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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); } /* |