Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bf62e8626963d0002315facb786a8833d404e21e
Commit:     bf62e8626963d0002315facb786a8833d404e21e
Parent:     9f1ccefe3f74e642515ba58868cfd6924056d9a8
Author:     Uwe Kleine-König <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 7 21:08:21 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 23:43:11 2007 +0100

    [ARM] 4545/1: ns9xxx: simplify irq ack'ing
    
    Now the drivers are responsible to clear the irq in the respective
    device, which seems to be the normal thing to do.
    
    So the ack'ing of the timer irq moved to time.c.
    
    Signed-off-by: Uwe Kleine-König <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-ns9xxx/irq.c  |   33 ---------------------------------
 arch/arm/mach-ns9xxx/time.c |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 33 deletions(-)

diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index b8c7b00..24d424e 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -17,33 +17,6 @@
 
 #include "generic.h"
 
-static void ns9xxx_ack_irq_timer(unsigned int irq)
-{
-       u32 tc = SYS_TC(irq - IRQ_TIMER0);
-
-       /*
-        * If the timer is programmed to halt on terminal count, the
-        * timer must be disabled before clearing the interrupt.
-        */
-       if (REGGET(tc, SYS_TCx, REN) == 0) {
-               REGSET(tc, SYS_TCx, TEN, DIS);
-               SYS_TC(irq - IRQ_TIMER0) = tc;
-       }
-
-       REGSET(tc, SYS_TCx, INTC, SET);
-       SYS_TC(irq - IRQ_TIMER0) = tc;
-
-       REGSET(tc, SYS_TCx, INTC, UNSET);
-       SYS_TC(irq - IRQ_TIMER0) = tc;
-}
-
-static void (*ns9xxx_ack_irq_functions[NR_IRQS])(unsigned int) = {
-       [IRQ_TIMER0] = ns9xxx_ack_irq_timer,
-       [IRQ_TIMER1] = ns9xxx_ack_irq_timer,
-       [IRQ_TIMER2] = ns9xxx_ack_irq_timer,
-       [IRQ_TIMER3] = ns9xxx_ack_irq_timer,
-};
-
 static void ns9xxx_mask_irq(unsigned int irq)
 {
        /* XXX: better use cpp symbols */
@@ -52,12 +25,6 @@ static void ns9xxx_mask_irq(unsigned int irq)
 
 static void ns9xxx_ack_irq(unsigned int irq)
 {
-       if (!ns9xxx_ack_irq_functions[irq]) {
-               printk(KERN_ERR "no ack function for irq %u\n", irq);
-               BUG();
-       }
-
-       ns9xxx_ack_irq_functions[irq](irq);
        SYS_ISRADDR = 0;
 }
 
diff --git a/arch/arm/mach-ns9xxx/time.c b/arch/arm/mach-ns9xxx/time.c
index b97d0c5..3327d30 100644
--- a/arch/arm/mach-ns9xxx/time.c
+++ b/arch/arm/mach-ns9xxx/time.c
@@ -24,10 +24,24 @@ static u32 usecs_per_tick;
 static irqreturn_t
 ns9xxx_timer_interrupt(int irq, void *dev_id)
 {
+       int timerno = irq - IRQ_TIMER0;
+       u32 tc;
+
        write_seqlock(&xtime_lock);
        timer_tick();
        write_sequnlock(&xtime_lock);
 
+       /* clear irq */
+       tc = SYS_TC(timerno);
+       if (REGGET(tc, SYS_TCx, REN) == SYS_TCx_REN_DIS) {
+               REGSET(tc, SYS_TCx, TEN, DIS);
+               SYS_TC(timerno) = tc;
+       }
+       REGSET(tc, SYS_TCx, INTC, SET);
+       SYS_TC(timerno) = tc;
+       REGSET(tc, SYS_TCx, INTC, UNSET);
+       SYS_TC(timerno) = tc;
+
        return IRQ_HANDLED;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to