]> err.no Git - linux-2.6/blobdiff - arch/blackfin/mach-common/ints-priority-dc.c
Pull thinkpad into release branch
[linux-2.6] / arch / blackfin / mach-common / ints-priority-dc.c
index f3cf07036c2a2af978bb42e2721a42167dc8b76b..660f881b620a3591ee54474c041bff0545a7a705 100644 (file)
@@ -4,7 +4,7 @@
  * Author:
  *
  * Created:      ?
- * Description:  Set up the interupt priorities
+ * Description:  Set up the interrupt priorities
  *
  * Modified:
  *               1996 Roman Zippel
@@ -183,7 +183,7 @@ static void bf561_gpio_ack_irq(unsigned int irq)
 {
        u16 gpionr = irq - IRQ_PF0;
 
-       if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
+       if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
                set_gpio_data(gpionr, 0);
                SSYNC();
        }
@@ -193,7 +193,7 @@ static void bf561_gpio_mask_ack_irq(unsigned int irq)
 {
        u16 gpionr = irq - IRQ_PF0;
 
-       if(gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
+       if (gpio_edge_triggered[gpio_bank(gpionr)] & gpio_bit(gpionr)) {
                set_gpio_data(gpionr, 0);
                SSYNC();
        }
@@ -222,7 +222,7 @@ static unsigned int bf561_gpio_irq_startup(unsigned int irq)
        if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
 
                ret = gpio_request(gpionr, NULL);
-               if(ret)
+               if (ret)
                        return ret;
 
        }
@@ -262,7 +262,7 @@ static int bf561_gpio_irq_type(unsigned int irq, unsigned int type)
                if (!(gpio_enabled[gpio_bank(gpionr)] & gpio_bit(gpionr))) {
 
                        ret = gpio_request(gpionr, NULL);
-                       if(ret)
+                       if (ret)
                                return ret;
 
                }
@@ -358,23 +358,10 @@ static void bf561_demux_gpio_irq(unsigned int inta_irq,
 
 #endif                         /* CONFIG_IRQCHIP_DEMUX_GPIO */
 
-/*
- * This function should be called during kernel startup to initialize
- * the BFin IRQ handling routines.
- */
-int __init init_arch_irq(void)
+void __init init_exception_vectors(void)
 {
-       int irq;
-       unsigned long ilat = 0;
-       /*  Disable all the peripheral intrs  - page 4-29 HW Ref manual */
-       bfin_write_SICA_IMASK0(SIC_UNMASK_ALL);
-       bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
        SSYNC();
 
-       local_irq_disable();
-
-       init_exception_buff();
-
 #ifndef CONFIG_KGDB
        bfin_write_EVT0(evt_emulation);
 #endif
@@ -392,8 +379,29 @@ int __init init_arch_irq(void)
        bfin_write_EVT14(evt14_softirq);
        bfin_write_EVT15(evt_system_call);
        CSYNC();
+}
+
+/*
+ * This function should be called during kernel startup to initialize
+ * the BFin IRQ handling routines.
+ */
+int __init init_arch_irq(void)
+{
+       int irq;
+       unsigned long ilat = 0;
+       /*  Disable all the peripheral intrs  - page 4-29 HW Ref manual */
+       bfin_write_SICA_IMASK0(SIC_UNMASK_ALL);
+       bfin_write_SICA_IMASK1(SIC_UNMASK_ALL);
+       SSYNC();
+
+       bfin_write_SICA_IWR0(IWR_ENABLE_ALL);
+       bfin_write_SICA_IWR1(IWR_ENABLE_ALL);
+
+       local_irq_disable();
+
+       init_exception_buff();
 
-       for (irq = 0; irq < SYS_IRQS; irq++) {
+       for (irq = 0; irq <= SYS_IRQS; irq++) {
                if (irq <= IRQ_CORETMR)
                        set_irq_chip(irq, &bf561_core_irqchip);
                else