m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-28 21:23:27 +0200
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-28 21:23:27 +0200
commit97124535ad5f545afc90ebeedb649c2cc36b9b12 (patch)
tree041797f2d995721ba03f4b30a6a1d2a688b29f67
parenta50d9c569d4157aa96fb9a80cf3205dbd80babbc (diff)
Update pong async handling
-rw-r--r--pci.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pci.c b/pci.c
index 11f6256..559274e 100644
--- a/pci.c
+++ b/pci.c
@@ -15,12 +15,6 @@ void handle_pong_sync(struct doom_data *doom_data)
up(&doom_data->pong_sem);
}
-void handle_pong_async(struct doom_data *doom_data)
-{
- up(&doom_data->pong_async_sem);
- disable_intr(doom_data->iomem, HARDDOOM_INTR_PONG_ASYNC);
-}
-
irqreturn_t doom_irq(int irq, void *dev)
{
uint32_t interrupts;
@@ -44,7 +38,9 @@ irqreturn_t doom_irq(int irq, void *dev)
}
if (interrupts & HARDDOOM_INTR_PONG_ASYNC) {
- handle_pong_async(doom_data);
+ up(&doom_data->pong_async_sem);
+ iowrite32(HARDDOOM_INTR_MASK & (~HARDDOOM_INTR_PONG_ASYNC),
+ iomem + HARDDOOM_INTR_ENABLE);
}
return IRQ_HANDLED;