]> err.no Git - linux-2.6/blobdiff - include/asm-powerpc/mpic.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
[linux-2.6] / include / asm-powerpc / mpic.h
index cb204a71e91233acc47812847ea1c17a3452e531..ae84dde3bc7f0574064a8927abc429a8004a1820 100644 (file)
@@ -3,6 +3,7 @@
 #ifdef __KERNEL__
 
 #include <linux/irq.h>
+#include <linux/sysdev.h>
 #include <asm/dcr.h>
 
 /*
@@ -199,7 +200,7 @@ enum {
 };
 
 
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
 /* Fixup table entry */
 struct mpic_irq_fixup
 {
@@ -208,7 +209,7 @@ struct mpic_irq_fixup
        u32             data;
        unsigned int    index;
 };
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
 
 
 enum mpic_reg_type {
@@ -223,23 +224,26 @@ struct mpic_reg_bank {
        u32 __iomem     *base;
 #ifdef CONFIG_PPC_DCR
        dcr_host_t      dhost;
-       unsigned int    dbase;
-       unsigned int    doff;
 #endif /* CONFIG_PPC_DCR */
 };
 
+struct mpic_irq_save {
+       u32             vecprio,
+                       dest;
+#ifdef CONFIG_MPIC_U3_HT_IRQS
+       u32             fixup_data;
+#endif
+};
+
 /* The instance data of a given MPIC */
 struct mpic
 {
-       /* The device node of the interrupt controller */
-       struct device_node      *of_node;
-
        /* The remapper for this MPIC */
        struct irq_host         *irqhost;
 
        /* The "linux" controller struct */
        struct irq_chip         hc_irq;
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
        struct irq_chip         hc_ht_irq;
 #endif
 #ifdef CONFIG_SMP
@@ -268,7 +272,7 @@ struct mpic
        /* Spurious vector to program into unused sources */
        unsigned int            spurious_vec;
 
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
        /* The fixup table */
        struct mpic_irq_fixup   *fixups;
        spinlock_t              fixup_lock;
@@ -283,17 +287,31 @@ struct mpic
        struct mpic_reg_bank    cpuregs[MPIC_MAX_CPUS];
        struct mpic_reg_bank    isus[MPIC_MAX_ISU];
 
-#ifdef CONFIG_PPC_DCR
-       unsigned int            dcr_base;
-#endif
+       /* Protected sources */
+       unsigned long           *protected;
 
 #ifdef CONFIG_MPIC_WEIRD
        /* Pointer to HW info array */
        u32                     *hw_set;
 #endif
 
+#ifdef CONFIG_PCI_MSI
+       spinlock_t              bitmap_lock;
+       unsigned long           *hwirq_bitmap;
+#endif
+
+#ifdef CONFIG_MPIC_BROKEN_REGREAD
+       u32                     isu_reg0_shadow[MPIC_MAX_IRQ_SOURCES];
+#endif
+
        /* link */
        struct mpic             *next;
+
+       struct sys_device       sysdev;
+
+#ifdef CONFIG_PM
+       struct mpic_irq_save    *save_data;
+#endif
 };
 
 /*
@@ -313,7 +331,7 @@ struct mpic
 /* Set this for a big-endian MPIC */
 #define MPIC_BIG_ENDIAN                        0x00000002
 /* Broken U3 MPIC */
-#define MPIC_BROKEN_U3                 0x00000004
+#define MPIC_U3_HT_IRQS                        0x00000004
 /* Broken IPI registers (autodetected) */
 #define MPIC_BROKEN_IPI                        0x00000008
 /* MPIC wants a reset */
@@ -352,7 +370,7 @@ struct mpic
  * @senses_num: number of entries in the array
  *
  * Note about the sense array. If none is passed, all interrupts are
- * setup to be level negative unless MPIC_BROKEN_U3 is set in which
+ * setup to be level negative unless MPIC_U3_HT_IRQS is set in which
  * case they are edge positive (and the array is ignored anyway).
  * The values in the array start at the first source of the MPIC,
  * that is senses[0] correspond to linux irq "irq_offset".