aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorVarun Sethi <Varun.Sethi@freescale.com>2012-08-08 00:06:09 -0400
committerKumar Gala <galak@kernel.crashing.org>2012-09-12 15:57:10 -0400
commit0a4081641d722d3dee140505a86330ecf44db0fe (patch)
treef516459f8da722251d432c5bae2d544da2ab33e4 /arch/powerpc/include
parent688ba1dbee8a49a2efe507cd9ae69634d92bb640 (diff)
powerpc/mpic: FSL MPIC error interrupt support.
All SOC device error interrupts are muxed and delivered to the core as a single MPIC error interrupt. Currently all the device drivers requiring access to device errors have to register for the MPIC error interrupt as a shared interrupt. With this patch we add interrupt demuxing capability in the mpic driver, allowing device drivers to register for their individual error interrupts. This is achieved by handling error interrupts in a cascaded fashion. MPIC error interrupt is handled by the "error_int_handler", which subsequently demuxes it using the EISR and delivers it to the respective drivers. The error interrupt capability is dependent on the MPIC EIMR register, which was introduced in FSL MPIC version 4.1 (P4080 rev2). So, error interrupt demuxing capability is dependent on the MPIC version and can be used for versions >= 4.1. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/mpic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
index e14d35d572af..c0f9ef90f0b8 100644
--- a/arch/powerpc/include/asm/mpic.h
+++ b/arch/powerpc/include/asm/mpic.h
@@ -118,6 +118,9 @@
118#define MPIC_MAX_CPUS 32 118#define MPIC_MAX_CPUS 32
119#define MPIC_MAX_ISU 32 119#define MPIC_MAX_ISU 32
120 120
121#define MPIC_MAX_ERR 32
122#define MPIC_FSL_ERR_INT 16
123
121/* 124/*
122 * Tsi108 implementation of MPIC has many differences from the original one 125 * Tsi108 implementation of MPIC has many differences from the original one
123 */ 126 */
@@ -270,6 +273,7 @@ struct mpic
270 struct irq_chip hc_ipi; 273 struct irq_chip hc_ipi;
271#endif 274#endif
272 struct irq_chip hc_tm; 275 struct irq_chip hc_tm;
276 struct irq_chip hc_err;
273 const char *name; 277 const char *name;
274 /* Flags */ 278 /* Flags */
275 unsigned int flags; 279 unsigned int flags;
@@ -283,6 +287,8 @@ struct mpic
283 /* vector numbers used for internal sources (ipi/timers) */ 287 /* vector numbers used for internal sources (ipi/timers) */
284 unsigned int ipi_vecs[4]; 288 unsigned int ipi_vecs[4];
285 unsigned int timer_vecs[8]; 289 unsigned int timer_vecs[8];
290 /* vector numbers used for FSL MPIC error interrupts */
291 unsigned int err_int_vecs[MPIC_MAX_ERR];
286 292
287 /* Spurious vector to program into unused sources */ 293 /* Spurious vector to program into unused sources */
288 unsigned int spurious_vec; 294 unsigned int spurious_vec;
@@ -306,6 +312,9 @@ struct mpic
306 struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; 312 struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS];
307 struct mpic_reg_bank isus[MPIC_MAX_ISU]; 313 struct mpic_reg_bank isus[MPIC_MAX_ISU];
308 314
315 /* ioremap'ed base for error interrupt registers */
316 u32 __iomem *err_regs;
317
309 /* Protected sources */ 318 /* Protected sources */
310 unsigned long *protected; 319 unsigned long *protected;
311 320
@@ -370,6 +379,11 @@ struct mpic
370#define MPIC_NO_RESET 0x00004000 379#define MPIC_NO_RESET 0x00004000
371/* Freescale MPIC (compatible includes "fsl,mpic") */ 380/* Freescale MPIC (compatible includes "fsl,mpic") */
372#define MPIC_FSL 0x00008000 381#define MPIC_FSL 0x00008000
382/* Freescale MPIC supports EIMR (error interrupt mask register).
383 * This flag is set for MPIC version >= 4.1 (version determined
384 * from the BRR1 register).
385*/
386#define MPIC_FSL_HAS_EIMR 0x00010000
373 387
374/* MPIC HW modification ID */ 388/* MPIC HW modification ID */
375#define MPIC_REGSET_MASK 0xf0000000 389#define MPIC_REGSET_MASK 0xf0000000