summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2004-09-22 04:20:22 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-22 04:20:22 -0700
commit221c85632c9018279dd24ce7b5c03d151004cdb8 (patch)
tree408e48ade68886c963df7b7c8286a333fced0434
parentc4a23b779e9c29d5a28eef4c588a6d4f80b4fa33 (diff)
[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: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc/syslib/open_pic.c8
-rw-r--r--include/asm-ppc/open_pic.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index a22f80c8cf6e..133797ab342c 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -412,7 +412,7 @@ void __init openpic_init(int offset)
/* Initialize the spurious interrupt */
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();
#ifdef CONFIG_EPIC_SERIAL_MODE
openpic_eicr_set_clk(7); /* Slowest value until we know better */
@@ -865,7 +865,7 @@ openpic_get_irq(struct pt_regs *regs)
irq = cirq;
openpic_eoi();
}
- } else if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset)
+ } else if (irq == OPENPIC_VEC_SPURIOUS)
irq = -1;
return irq;
}
@@ -988,9 +988,9 @@ int openpic_resume(struct sys_device *sysdev)
/* OpenPIC sometimes seem to need some time to be fully back up... */
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)
- != (OPENPIC_VEC_SPURIOUS + open_pic_irq_offset));
+ != OPENPIC_VEC_SPURIOUS);
openpic_disable_8259_pass_through();
diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
index 8841a5cc21a9..289761f853a4 100644
--- a/include/asm-ppc/open_pic.h
+++ b/include/asm-ppc/open_pic.h
@@ -23,7 +23,7 @@
#define OPENPIC_VEC_TIMER 110 /* and up */
#define OPENPIC_VEC_IPI 118 /* and up */
-#define OPENPIC_VEC_SPURIOUS 239
+#define OPENPIC_VEC_SPURIOUS 255
/* OpenPIC IRQ controller structure */
extern struct hw_interrupt_type open_pic;