summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/ppc/platforms/prep_pci.c15
-rw-r--r--include/asm-ppc/open_pic.h2
2 files changed, 12 insertions, 5 deletions
diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
index 0da623473276..1d420731654f 100644
--- a/arch/ppc/platforms/prep_pci.c
+++ b/arch/ppc/platforms/prep_pci.c
@@ -837,7 +837,7 @@ void __init
ibm_prep_init(void)
{
if (have_residual_data) {
- u32 addr, real_addr, len;
+ u32 addr, real_addr, len, offset;
PPC_DEVICE *mpic;
PnP_TAG_PACKET *pkt;
@@ -859,15 +859,22 @@ ibm_prep_init(void)
return;
#define p pkt->L4_Pack.L4_Data.L4_PPCPack
- if (!((p.PPCData[0] == 2) && (p.PPCData[1] == 32)))
- return; /* not a 32-bit memory address */
+ if (p.PPCData[1] == 32) {
+ switch (p.PPCData[0]) {
+ case 1: offset = PREP_ISA_IO_BASE; break;
+ case 2: offset = PREP_ISA_MEM_BASE; break;
+ default: return; /* Not I/O or memory?? */
+ }
+ }
+ else
+ return; /* Not a 32-bit address */
real_addr = ld_le32((unsigned int *) (p.PPCData + 4));
if (real_addr == 0xffffffff)
return;
/* Adjust address to be as seen by CPU */
- addr = real_addr + PREP_ISA_MEM_BASE;
+ addr = real_addr + offset;
len = ld_le32((unsigned int *) (p.PPCData + 12));
if (!len)
diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h
index 38d8edb1ba70..8841a5cc21a9 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 127
+#define OPENPIC_VEC_SPURIOUS 239
/* OpenPIC IRQ controller structure */
extern struct hw_interrupt_type open_pic;