MIPS: Loongson: Remove set_irq_trigger_mode()
authorWu Zhangjin <wuzhangjin@gmail.com>
Sat, 24 Jul 2010 01:22:13 +0000 (09:22 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 5 Aug 2010 12:26:23 +0000 (13:26 +0100)
set_irq_trigger_mode() is not needed on all platforms so remove it
and move the related source code to mach_init_irq().

This will allow gdium to share the common irq.c without adding an empty
set_irq_trigger_mode().

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1493/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-loongson/loongson.h
arch/mips/loongson/common/irq.c
arch/mips/loongson/fuloong-2e/irq.c
arch/mips/loongson/lemote-2f/irq.c

index fcdbe3a4ce1f4f42de0887506cf1c3cba584e04d..53ee881c675d806e91ee71aaea67ef11d3ccb927 100644 (file)
@@ -45,7 +45,6 @@ static inline void prom_init_uart_base(void)
 /* irq operation functions */
 extern void bonito_irqdispatch(void);
 extern void __init bonito_irq_init(void);
-extern void __init set_irq_trigger_mode(void);
 extern void __init mach_init_irq(void);
 extern void mach_irq_dispatch(unsigned int pending);
 extern int mach_i8259_irq(void);
index 25a11df034821a700fbfc9da70c7c642e9a21b0b..5897471dedcada602d7e3ea720d1bf909e63d354 100644 (file)
@@ -53,9 +53,6 @@ void __init arch_init_irq(void)
         */
        clear_c0_status(ST0_IM | ST0_BEV);
 
-       /* setting irq trigger mode */
-       set_irq_trigger_mode();
-
        /* no steer */
        LOONGSON_INTSTEER = 0;
 
index 320e9379bdd769e9171b5287218619ccf13de7c3..99e08c3db3f42d460c33be081ba0121d588bee61 100644 (file)
@@ -44,13 +44,6 @@ static struct irqaction cascade_irqaction = {
        .name = "cascade",
 };
 
-void __init set_irq_trigger_mode(void)
-{
-       /* most bonito irq should be level triggered */
-       LOONGSON_INTEDGE = LOONGSON_ICU_SYSTEMERR | LOONGSON_ICU_MASTERERR |
-           LOONGSON_ICU_RETRYERR | LOONGSON_ICU_MBOXES;
-}
-
 void __init mach_init_irq(void)
 {
        /* init all controller
@@ -59,6 +52,10 @@ void __init mach_init_irq(void)
         *   32-63        ------> bonito irq
         */
 
+       /* most bonito irq should be level triggered */
+       LOONGSON_INTEDGE = LOONGSON_ICU_SYSTEMERR | LOONGSON_ICU_MASTERERR |
+           LOONGSON_ICU_RETRYERR | LOONGSON_ICU_MBOXES;
+
        /* Sets the first-level interrupt dispatcher. */
        mips_cpu_irq_init();
        init_i8259_irqs();
index 1d8b4d28a0580c3ada3b4eb1834ad64db50c3b59..c6db7e7df963bec8688ef27ce9b0b37ee5ae2267 100644 (file)
@@ -91,13 +91,6 @@ void mach_irq_dispatch(unsigned int pending)
                spurious_interrupt();
 }
 
-void __init set_irq_trigger_mode(void)
-{
-       /* setup cs5536 as high level trigger */
-       LOONGSON_INTPOL = LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1;
-       LOONGSON_INTEDGE &= ~(LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1);
-}
-
 static irqreturn_t ip6_action(int cpl, void *dev_id)
 {
        return IRQ_HANDLED;
@@ -122,6 +115,10 @@ void __init mach_init_irq(void)
         *   32-63        ------> bonito irq
         */
 
+       /* setup cs5536 as high level trigger */
+       LOONGSON_INTPOL = LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1;
+       LOONGSON_INTEDGE &= ~(LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1);
+
        /* Sets the first-level interrupt dispatcher. */
        mips_cpu_irq_init();
        init_i8259_irqs();