summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx/mpc85xx_cds.c
diff options
context:
space:
mode:
authorKyle Moffett2011-12-02 07:27:59 +0100
committerBenjamin Herrenschmidt2011-12-07 03:43:06 +0100
commit8bf41568969e003c3d5410124e27bbdce7852e1b (patch)
tree684fee8aa54797e2482afd66b94f9633fcbd5061 /arch/powerpc/platforms/85xx/mpc85xx_cds.c
parentpowerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h" (diff)
downloadkernel-qcow2-linux-8bf41568969e003c3d5410124e27bbdce7852e1b.tar.gz
kernel-qcow2-linux-8bf41568969e003c3d5410124e27bbdce7852e1b.tar.xz
kernel-qcow2-linux-8bf41568969e003c3d5410124e27bbdce7852e1b.zip
powerpc: Consolidate mpic_alloc() OF address translation
Instead of using the open-coded "reg" property lookup and address translation in mpic_alloc(), directly call of_address_to_resource(). This includes various workarounds for special cases which the naive of_address_translate() does not. Afterwards it is possible to remove the copiously copy-pasted calls to of_address_translate() from the 85xx/86xx/powermac platforms. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc85xx_cds.c')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index d993b66f1abf..62b90c359699 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -188,7 +188,6 @@ static struct irqaction mpc85xxcds_8259_irqaction = {
static void __init mpc85xx_cds_pic_init(void)
{
struct mpic *mpic;
- struct resource r;
struct device_node *np = NULL;
np = of_find_node_by_type(np, "open-pic");
@@ -198,13 +197,7 @@ static void __init mpc85xx_cds_pic_init(void)
return;
}
- if (of_address_to_resource(np, 0, &r)) {
- printk(KERN_ERR "Failed to map mpic register space\n");
- of_node_put(np);
- return;
- }
-
- mpic = mpic_alloc(np, r.start,
+ mpic = mpic_alloc(np, 0,
MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
0, 256, " OpenPIC ");
BUG_ON(mpic == NULL);