Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH 8/11] OMAP2: ack PIC after marking pending IRQs



--Imre
From 28682ecf0e0a5e9efe7a358c9b2054deb2ca3d4a Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak%teleca.com@localhost>
Date: Fri, 25 Apr 2008 16:06:57 +0300
Subject: [PATCH] OMAP2: ack PIC after marking pending IRQs

This is needed, so that the PIC doesn't assert the IRQ line for
IRQs that we have already marked as pending.
---
 sys/arch/arm/omap/omap2_icu.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/sys/arch/arm/omap/omap2_icu.c b/sys/arch/arm/omap/omap2_icu.c
index 1d790c5..1f35955 100644
--- a/sys/arch/arm/omap/omap2_icu.c
+++ b/sys/arch/arm/omap/omap2_icu.c
@@ -118,6 +118,15 @@ omap2icu_block_irqs(struct pic_softc *pic, size_t irqbase, 
uint32_t irq_mask)
        sc->sc_enabled_irqs[group] &= ~irq_mask;
 }
 
+static void
+omap2icu_ack_pic(struct pic_softc *pic)
+{
+       struct omap2icu_softc * const sc = PICTOSOFTC(pic);
+
+       /* Force INTC to recompute IRQ availability */
+       INTC_WRITE(sc, 0, INTC_CONTROL, INTC_CONTROL_NEWIRQAGR);
+}
+
 /*
  * Called with interrupts disabled
  */
@@ -154,6 +163,8 @@ omap_irq_handler(void *frame)
        if (sc->sc_enabled_irqs[2])
                ipl_mask |= find_pending_irqs(sc, 2);
 
+       omap2icu_ack_pic(&sc->sc_pic);
+
        /*
         * Record the pending_ipls and deliver them if we can.
         */
-- 
1.5.4.2



Home | Main Index | Thread Index | Old Index