Commit b9f0f1bb authored by Kim Phillips's avatar Kim Phillips Committed by Paul Mackerras

[POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ sense

This converts ipic code to Benh's IRQ mods.  For the IPIC, IRQ sense values in the device tree equal those in include/linux/irq.h; that's 8 for low assertion (most internal IRQs on mpc83xx), and 2 for high-to-low change.

spinlocks added to [un]mask, ack operations; default handler and type now set in host_map; and redundant condition check eliminated.
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bf4152dd
This diff is collapsed.
...@@ -15,7 +15,18 @@ ...@@ -15,7 +15,18 @@
#include <asm/ipic.h> #include <asm/ipic.h>
#define MPC83xx_IPIC_SIZE (0x00100) #define NR_IPIC_INTS 128
/* External IRQS */
#define IPIC_IRQ_EXT0 48
#define IPIC_IRQ_EXT1 17
#define IPIC_IRQ_EXT7 23
/* Default Priority Registers */
#define IPIC_SIPRR_A_DEFAULT 0x05309770
#define IPIC_SIPRR_D_DEFAULT 0x05309770
#define IPIC_SMPRR_A_DEFAULT 0x05309770
#define IPIC_SMPRR_B_DEFAULT 0x05309770
/* System Global Interrupt Configuration Register */ /* System Global Interrupt Configuration Register */
#define SICFR_IPSA 0x00010000 #define SICFR_IPSA 0x00010000
...@@ -31,7 +42,15 @@ ...@@ -31,7 +42,15 @@
struct ipic { struct ipic {
volatile u32 __iomem *regs; volatile u32 __iomem *regs;
unsigned int irq_offset;
/* The remapper for this IPIC */
struct irq_host *irqhost;
/* The "linux" controller struct */
struct irq_chip hc_irq;
/* The device node of the interrupt controller */
struct device_node *of_node;
}; };
struct ipic_info { struct ipic_info {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment