summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-26 21:55:33 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-26 21:55:33 +1000
commitbd561c79dce9036c9efb17420b6cf8763c8c9de3 (patch)
treed716828d74afe4dd6bcc012d761c0a3006c35e88 /arch/powerpc/sysdev
parentfa39dc437a41733adaba241fd9036760283a516a (diff)
powerpc: Fix incorrect timer register addresses in mpic.c
We were computing the wrong address for the MPIC timer registers, so when we went to initialize them we would have been hitting some unrelated ioremap... oops. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/mpic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 3948e759d41..105f05341a4 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -358,7 +358,7 @@ static void mpic_enable_irq(unsigned int irq)
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = irq - mpic->irq_offset;
- DBG("%s: enable_irq: %d (src %d)\n", mpic->name, irq, src);
+ DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK);
@@ -511,7 +511,7 @@ struct mpic * __init mpic_alloc(unsigned long phys_addr,
/* Map the global registers */
mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000);
- mpic->tmregs = mpic->gregs + (MPIC_TIMER_BASE >> 2);
+ mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2);
BUG_ON(mpic->gregs == NULL);
/* Reset */
@@ -648,7 +648,6 @@ void __init mpic_init(struct mpic *mpic)
continue;
irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU;
irq_desc[mpic->ipi_offset+i].handler = &mpic->hc_ipi;
-
#endif /* CONFIG_SMP */
}