diff options
author | Kyle Moffett <Kyle.D.Moffett@boeing.com> | 2011-12-02 06:27:59 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 13:43:06 +1100 |
commit | 8bf41568969e003c3d5410124e27bbdce7852e1b (patch) | |
tree | 684fee8aa54797e2482afd66b94f9633fcbd5061 /arch/powerpc/platforms/85xx/xes_mpc85xx.c | |
parent | 582d3e099413c3741a88bdee9e3ff3cc2f9d3329 (diff) | |
download | blackbird-op-linux-8bf41568969e003c3d5410124e27bbdce7852e1b.tar.gz blackbird-op-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/xes_mpc85xx.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/xes_mpc85xx.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c index daf9bef63de4..2be5e4de1882 100644 --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c @@ -44,7 +44,6 @@ void __init xes_mpc85xx_pic_init(void) { struct mpic *mpic; - struct resource r; struct device_node *np; np = of_find_node_by_type(NULL, "open-pic"); @@ -53,13 +52,7 @@ void __init xes_mpc85xx_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 | MPIC_BROKEN_FRR_NIRQS, 0, 256, " OpenPIC "); |