summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
diff options
context:
space:
mode:
authorKyle Moffett <Kyle.D.Moffett@boeing.com>2011-12-02 06:28:01 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-07 13:43:07 +1100
commite7a98675caf272a11dc1012c7a8c6c00cab09f5b (patch)
tree856c69993207021ffda5550d3e12d88de7381e15 /arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
parent5bdb6f2e5833c1c3e5ea21a2050fe0fada3a4a1d (diff)
downloadtalos-obmc-linux-e7a98675caf272a11dc1012c7a8c6c00cab09f5b.tar.gz
talos-obmc-linux-e7a98675caf272a11dc1012c7a8c6c00cab09f5b.zip
powerpc/mpic: Save computed phys_addr for board-specific code
The MPIC code can already perform an automatic OF address translation step as part of mpic_alloc(), but several boards need to use that base address when they perform mpic_assign_isu(). The easiest solution is to save the computed physical address into the "struct mpic" for later use by the board code. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c')
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index f8f33e16c6b6..c8ce204abd2d 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -102,7 +102,6 @@ static void __init mpc7448_hpc2_setup_arch(void)
static void __init mpc7448_hpc2_init_IRQ(void)
{
struct mpic *mpic;
- phys_addr_t mpic_paddr = 0;
struct device_node *tsi_pic;
#ifdef CONFIG_PCI
unsigned int cascade_pci_irq;
@@ -111,21 +110,12 @@ static void __init mpc7448_hpc2_init_IRQ(void)
#endif
tsi_pic = of_find_node_by_type(NULL, "open-pic");
- if (tsi_pic) {
- unsigned int size;
- const void *prop = of_get_property(tsi_pic, "reg", &size);
- mpic_paddr = of_translate_address(tsi_pic, prop);
- }
-
- if (mpic_paddr == 0) {
+ if (!tsi_pic) {
printk("%s: No tsi108 PIC found !\n", __func__);
return;
}
- DBG("%s: tsi108 pic phys_addr = 0x%x\n", __func__,
- (u32) mpic_paddr);
-
- mpic = mpic_alloc(tsi_pic, mpic_paddr,
+ mpic = mpic_alloc(tsi_pic, 0,
MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
24,
@@ -134,7 +124,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
BUG_ON(mpic == NULL);
- mpic_assign_isu(mpic, 0, mpic_paddr + 0x100);
+ mpic_assign_isu(mpic, 0, mpic->paddr + 0x100);
mpic_init(mpic);
OpenPOWER on IntegriCloud