[ARM] 3709/1: pnx4008: convert to generic irq subsystem
authorVitaly Wool <vwool@ru.mvista.com>
Wed, 5 Jul 2006 13:47:20 +0000 (14:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 5 Jul 2006 13:47:20 +0000 (14:47 +0100)
Patch from Vitaly Wool

Convert pnx4008 chip support to use generic irq subsystem

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pnx4008/core.c
arch/arm/mach-pnx4008/dma.c
arch/arm/mach-pnx4008/irq.c
arch/arm/mach-pnx4008/time.c

index ba91daad64fbf72cae3a5ed0c074b5d5bfaaa265..3d73c1e937529f03878ca6803dbc4872891458e9 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/spi/spi.h>
 
 #include <asm/hardware.h>
-#include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -36,7 +35,6 @@
 #include <asm/system.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 
index 981aa9dcdeded1b6c3d85f9fe3990b4049f8a655..ec01574f88ac995e5a72b19be62baf5e6e2eb2e7 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/clk.h>
 
 #include <asm/system.h>
-#include <asm/irq.h>
 #include <asm/hardware.h>
 #include <asm/dma.h>
 #include <asm/dma-mapping.h>
index 9b0a8e084e99f71cb23f19449ec0aef6817d5086..3a4bcf3d91fa578d5ed374f4e96d29d23c4c8b2e 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/device.h>
+#include <linux/irq.h>
 #include <asm/hardware.h>
-#include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -96,26 +96,24 @@ void __init pnx4008_init_irq(void)
 {
        unsigned int i;
 
-       /* configure and enable IRQ 0,1,30,31 (cascade interrupts) mask all others */
+       /* configure IRQ's */
+       for (i = 0; i < NR_IRQS; i++) {
+               set_irq_flags(i, IRQF_VALID);
+               set_irq_chip(i, &pnx4008_irq_chip);
+               pnx4008_set_irq_type(i, pnx4008_irq_type[i]);
+       }
+
+       /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */
        pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]);
        pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]);
        pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]);
        pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]);
 
+       /* mask all others */
        __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) |
                        (1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N),
                INTC_ER(MAIN_BASE_INT));
        __raw_writel(0, INTC_ER(SIC1_BASE_INT));
        __raw_writel(0, INTC_ER(SIC2_BASE_INT));
-
-       /* configure all other IRQ's */
-       for (i = 0; i < NR_IRQS; i++) {
-               if (i == SUB2_FIQ_N || i == SUB1_FIQ_N ||
-                       i == SUB2_IRQ_N || i == SUB1_IRQ_N)
-                       continue;
-               set_irq_flags(i, IRQF_VALID);
-               set_irq_chip(i, &pnx4008_irq_chip);
-               pnx4008_set_irq_type(i, pnx4008_irq_type[i]);
-       }
 }
 
index 888bf6cfba8a7b15370aee9a2448e39b1cb4dc36..756228ddd035de276cb27fef771e55ec5b92f532 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
+#include <linux/time.h>
+#include <linux/timex.h>
+#include <linux/irq.h>
 
 #include <asm/system.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/leds.h>
-#include <asm/irq.h>
-#include <asm/mach/irq.h>
 #include <asm/mach/time.h>
-
-#include <linux/time.h>
-#include <linux/timex.h>
 #include <asm/errno.h>
 
 /*! Note: all timers are UPCOUNTING */