aboutsummaryrefslogtreecommitdiff
path: root/hw/psi.c
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2019-01-18 10:30:06 +0800
committerStewart Smith <stewart@linux.ibm.com>2019-05-15 16:22:23 +1000
commitdf34cedd050a966b334973c933e5e7e90164b6ec (patch)
tree83d1f14c732c36c10954b7055ba5697c5765c967 /hw/psi.c
parent32d44e3555218a7df92b56a411c271617dad77c4 (diff)
downloadskiboot-df34cedd050a966b334973c933e5e7e90164b6ec.zip
skiboot-df34cedd050a966b334973c933e5e7e90164b6ec.tar.gz
skiboot-df34cedd050a966b334973c933e5e7e90164b6ec.tar.bz2
Add P9 DIO interrupt support
On P9 there are GPIO port 0, 1, 2 for GPIO interrupt, and DIO interrupt is used to handle the interrupts. Add support to the DIO interrupts: 1. Add dio_interrupt_register(chip, port, callback) to register the interrupt; 2. Add dio_interrupt_deregister(chip, port, callback) to deregister; 3. When interrupt on the port occurs, callback is invoked, and the interrupt status is cleared. Signed-off-by: Lei YU <mine260309@gmail.com> [oliver: Fixed Makefile.inc merge conflict] Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/psi.c')
-rw-r--r--hw/psi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/psi.c b/hw/psi.c
index 2f7ab5f..ff6b0a9 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -24,6 +24,7 @@
#include <gx.h>
#include <interrupts.h>
#include <cpu.h>
+#include <dio-p9.h>
#include <trace.h>
#include <xscom.h>
#include <chip.h>
@@ -604,6 +605,7 @@ static void psihb_p9_interrupt(struct irq_source *is, uint32_t isn)
break;
case P9_PSI_IRQ_DIO:
printf("PSI: DIO irq received\n");
+ dio_interrupt_handler(psi->chip_id);
break;
case P9_PSI_IRQ_PSU:
p9_sbe_interrupt(psi->chip_id);