Commit 221c8563 authored by Andy Fleming's avatar Andy Fleming Committed by Linus Torvalds

[PATCH] ppc32: 85xx spurious interrupt bug

The Spurious interrupt assignment for OpenPIC was the constant,
OPENPIC_VEC_SPURIOUS plus the offset passed in.  Due to bugs in some
OpenPICs, the end value needed to be 255 on those systems.  However, the
constant was then chosen to be 239, because offset on most systems is 16.
The 85xx has an offset of 64, however, and so this assignment caused
lock-ups during boot.  The proposed solution is to declare
OPENPIC_VEC_SPURIOUS to be 255, and use that value directly, instead of
adding the offset to it.
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c4a23b77
...@@ -412,7 +412,7 @@ void __init openpic_init(int offset) ...@@ -412,7 +412,7 @@ void __init openpic_init(int offset)
/* Initialize the spurious interrupt */ /* Initialize the spurious interrupt */
if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd); if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd);
openpic_set_spurious(OPENPIC_VEC_SPURIOUS+offset); openpic_set_spurious(OPENPIC_VEC_SPURIOUS);
openpic_disable_8259_pass_through(); openpic_disable_8259_pass_through();
#ifdef CONFIG_EPIC_SERIAL_MODE #ifdef CONFIG_EPIC_SERIAL_MODE
openpic_eicr_set_clk(7); /* Slowest value until we know better */ openpic_eicr_set_clk(7); /* Slowest value until we know better */
...@@ -865,7 +865,7 @@ openpic_get_irq(struct pt_regs *regs) ...@@ -865,7 +865,7 @@ openpic_get_irq(struct pt_regs *regs)
irq = cirq; irq = cirq;
openpic_eoi(); openpic_eoi();
} }
} else if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset) } else if (irq == OPENPIC_VEC_SPURIOUS)
irq = -1; irq = -1;
return irq; return irq;
} }
...@@ -988,9 +988,9 @@ int openpic_resume(struct sys_device *sysdev) ...@@ -988,9 +988,9 @@ int openpic_resume(struct sys_device *sysdev)
/* OpenPIC sometimes seem to need some time to be fully back up... */ /* OpenPIC sometimes seem to need some time to be fully back up... */
do { do {
openpic_set_spurious(OPENPIC_VEC_SPURIOUS+open_pic_irq_offset); openpic_set_spurious(OPENPIC_VEC_SPURIOUS);
} while(openpic_readfield(&OpenPIC->Global.Spurious_Vector, OPENPIC_VECTOR_MASK) } while(openpic_readfield(&OpenPIC->Global.Spurious_Vector, OPENPIC_VECTOR_MASK)
!= (OPENPIC_VEC_SPURIOUS + open_pic_irq_offset)); != OPENPIC_VEC_SPURIOUS);
openpic_disable_8259_pass_through(); openpic_disable_8259_pass_through();
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#define OPENPIC_VEC_TIMER 110 /* and up */ #define OPENPIC_VEC_TIMER 110 /* and up */
#define OPENPIC_VEC_IPI 118 /* and up */ #define OPENPIC_VEC_IPI 118 /* and up */
#define OPENPIC_VEC_SPURIOUS 239 #define OPENPIC_VEC_SPURIOUS 255
/* OpenPIC IRQ controller structure */ /* OpenPIC IRQ controller structure */
extern struct hw_interrupt_type open_pic; extern struct hw_interrupt_type open_pic;
......
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