diff options
author | Kyle Moffett <Kyle.D.Moffett@boeing.com> | 2011-12-02 01:28:01 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-06 21:43:07 -0500 |
commit | e7a98675caf272a11dc1012c7a8c6c00cab09f5b (patch) | |
tree | 856c69993207021ffda5550d3e12d88de7381e15 /arch/powerpc/platforms/embedded6xx/holly.c | |
parent | 5bdb6f2e5833c1c3e5ea21a2050fe0fada3a4a1d (diff) |
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/holly.c')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/holly.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index 2e9bcf6444c8..d4fb41e29c35 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c | |||
@@ -148,7 +148,6 @@ static void __init holly_setup_arch(void) | |||
148 | static void __init holly_init_IRQ(void) | 148 | static void __init holly_init_IRQ(void) |
149 | { | 149 | { |
150 | struct mpic *mpic; | 150 | struct mpic *mpic; |
151 | phys_addr_t mpic_paddr = 0; | ||
152 | struct device_node *tsi_pic; | 151 | struct device_node *tsi_pic; |
153 | #ifdef CONFIG_PCI | 152 | #ifdef CONFIG_PCI |
154 | unsigned int cascade_pci_irq; | 153 | unsigned int cascade_pci_irq; |
@@ -157,20 +156,12 @@ static void __init holly_init_IRQ(void) | |||
157 | #endif | 156 | #endif |
158 | 157 | ||
159 | tsi_pic = of_find_node_by_type(NULL, "open-pic"); | 158 | tsi_pic = of_find_node_by_type(NULL, "open-pic"); |
160 | if (tsi_pic) { | 159 | if (!tsi_pic) { |
161 | unsigned int size; | ||
162 | const void *prop = of_get_property(tsi_pic, "reg", &size); | ||
163 | mpic_paddr = of_translate_address(tsi_pic, prop); | ||
164 | } | ||
165 | |||
166 | if (mpic_paddr == 0) { | ||
167 | printk(KERN_ERR "%s: No tsi108 PIC found !\n", __func__); | 160 | printk(KERN_ERR "%s: No tsi108 PIC found !\n", __func__); |
168 | return; | 161 | return; |
169 | } | 162 | } |
170 | 163 | ||
171 | pr_debug("%s: tsi108 pic phys_addr = 0x%x\n", __func__, (u32) mpic_paddr); | 164 | mpic = mpic_alloc(tsi_pic, 0, |
172 | |||
173 | mpic = mpic_alloc(tsi_pic, mpic_paddr, | ||
174 | MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET | | 165 | MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET | |
175 | MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, | 166 | MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, |
176 | 24, | 167 | 24, |
@@ -179,7 +170,7 @@ static void __init holly_init_IRQ(void) | |||
179 | 170 | ||
180 | BUG_ON(mpic == NULL); | 171 | BUG_ON(mpic == NULL); |
181 | 172 | ||
182 | mpic_assign_isu(mpic, 0, mpic_paddr + 0x100); | 173 | mpic_assign_isu(mpic, 0, mpic->paddr + 0x100); |
183 | 174 | ||
184 | mpic_init(mpic); | 175 | mpic_init(mpic); |
185 | 176 | ||