From 8bf41568969e003c3d5410124e27bbdce7852e1b Mon Sep 17 00:00:00 2001 From: Kyle Moffett Date: Fri, 2 Dec 2011 06:27:59 +0000 Subject: 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 Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Grant Likely Cc: Kumar Gala Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/86xx/pic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/powerpc/platforms/86xx') diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c index 8ef8960abda6..f85c8f0aa966 100644 --- a/arch/powerpc/platforms/86xx/pic.c +++ b/arch/powerpc/platforms/86xx/pic.c @@ -33,7 +33,6 @@ void __init mpc86xx_init_irq(void) { struct mpic *mpic; struct device_node *np; - struct resource res; #ifdef CONFIG_PPC_I8259 struct device_node *cascade_node = NULL; int cascade_irq; @@ -43,9 +42,8 @@ void __init mpc86xx_init_irq(void) np = of_find_node_by_type(NULL, "open-pic"); if (np == NULL) return; - of_address_to_resource(np, 0, &res); - mpic = mpic_alloc(np, res.start, + mpic = mpic_alloc(np, 0, MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU, -- cgit v1.2.3