aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/embedded6xx/holly.c15
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c14
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c16
-rw-r--r--arch/powerpc/platforms/embedded6xx/storcenter.c16
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
5 files changed, 14 insertions, 49 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 2e9bcf6444c..d4fb41e29c3 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)
148static void __init holly_init_IRQ(void) 148static 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
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 244f997de79..72b36850c5e 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -82,28 +82,22 @@ static void __init linkstation_init_IRQ(void)
82{ 82{
83 struct mpic *mpic; 83 struct mpic *mpic;
84 struct device_node *dnp; 84 struct device_node *dnp;
85 const u32 *prop;
86 int size;
87 phys_addr_t paddr;
88 85
89 dnp = of_find_node_by_type(NULL, "open-pic"); 86 dnp = of_find_node_by_type(NULL, "open-pic");
90 if (dnp == NULL) 87 if (dnp == NULL)
91 return; 88 return;
92 89
93 prop = of_get_property(dnp, "reg", &size); 90 mpic = mpic_alloc(dnp, 0, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC ");
94 paddr = (phys_addr_t)of_translate_address(dnp, prop);
95
96 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC ");
97 BUG_ON(mpic == NULL); 91 BUG_ON(mpic == NULL);
98 92
99 /* PCI IRQs */ 93 /* PCI IRQs */
100 mpic_assign_isu(mpic, 0, paddr + 0x10200); 94 mpic_assign_isu(mpic, 0, mpic->paddr + 0x10200);
101 95
102 /* I2C */ 96 /* I2C */
103 mpic_assign_isu(mpic, 1, paddr + 0x11000); 97 mpic_assign_isu(mpic, 1, mpic->paddr + 0x11000);
104 98
105 /* ttyS0, ttyS1 */ 99 /* ttyS0, ttyS1 */
106 mpic_assign_isu(mpic, 2, paddr + 0x11100); 100 mpic_assign_isu(mpic, 2, mpic->paddr + 0x11100);
107 101
108 mpic_init(mpic); 102 mpic_init(mpic);
109} 103}
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index f8f33e16c6b..c8ce204abd2 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)
102static void __init mpc7448_hpc2_init_IRQ(void) 102static void __init mpc7448_hpc2_init_IRQ(void)
103{ 103{
104 struct mpic *mpic; 104 struct mpic *mpic;
105 phys_addr_t mpic_paddr = 0;
106 struct device_node *tsi_pic; 105 struct device_node *tsi_pic;
107#ifdef CONFIG_PCI 106#ifdef CONFIG_PCI
108 unsigned int cascade_pci_irq; 107 unsigned int cascade_pci_irq;
@@ -111,21 +110,12 @@ static void __init mpc7448_hpc2_init_IRQ(void)
111#endif 110#endif
112 111
113 tsi_pic = of_find_node_by_type(NULL, "open-pic"); 112 tsi_pic = of_find_node_by_type(NULL, "open-pic");
114 if (tsi_pic) { 113 if (!tsi_pic) {
115 unsigned int size;
116 const void *prop = of_get_property(tsi_pic, "reg", &size);
117 mpic_paddr = of_translate_address(tsi_pic, prop);
118 }
119
120 if (mpic_paddr == 0) {
121 printk("%s: No tsi108 PIC found !\n", __func__); 114 printk("%s: No tsi108 PIC found !\n", __func__);
122 return; 115 return;
123 } 116 }
124 117
125 DBG("%s: tsi108 pic phys_addr = 0x%x\n", __func__, 118 mpic = mpic_alloc(tsi_pic, 0,
126 (u32) mpic_paddr);
127
128 mpic = mpic_alloc(tsi_pic, mpic_paddr,
129 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET | 119 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
130 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, 120 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
131 24, 121 24,
@@ -134,7 +124,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
134 124
135 BUG_ON(mpic == NULL); 125 BUG_ON(mpic == NULL);
136 126
137 mpic_assign_isu(mpic, 0, mpic_paddr + 0x100); 127 mpic_assign_isu(mpic, 0, mpic->paddr + 0x100);
138 128
139 mpic_init(mpic); 129 mpic_init(mpic);
140 130
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c
index f1eebcae9bf..084f0fc706b 100644
--- a/arch/powerpc/platforms/embedded6xx/storcenter.c
+++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
@@ -84,22 +84,12 @@ static void __init storcenter_init_IRQ(void)
84{ 84{
85 struct mpic *mpic; 85 struct mpic *mpic;
86 struct device_node *dnp; 86 struct device_node *dnp;
87 const void *prop;
88 int size;
89 phys_addr_t paddr;
90 87
91 dnp = of_find_node_by_type(NULL, "open-pic"); 88 dnp = of_find_node_by_type(NULL, "open-pic");
92 if (dnp == NULL) 89 if (dnp == NULL)
93 return; 90 return;
94 91
95 prop = of_get_property(dnp, "reg", &size); 92 mpic = mpic_alloc(dnp, 0, MPIC_PRIMARY | MPIC_WANTS_RESET,
96 if (prop == NULL) {
97 of_node_put(dnp);
98 return;
99 }
100
101 paddr = (phys_addr_t)of_translate_address(dnp, prop);
102 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
103 16, 32, " OpenPIC "); 93 16, 32, " OpenPIC ");
104 94
105 of_node_put(dnp); 95 of_node_put(dnp);
@@ -110,8 +100,8 @@ static void __init storcenter_init_IRQ(void)
110 * 16 Serial Interrupts followed by 16 Internal Interrupts. 100 * 16 Serial Interrupts followed by 16 Internal Interrupts.
111 * I2C is the second internal, so it is at 17, 0x11020. 101 * I2C is the second internal, so it is at 17, 0x11020.
112 */ 102 */
113 mpic_assign_isu(mpic, 0, paddr + 0x10200); 103 mpic_assign_isu(mpic, 0, mpic->paddr + 0x10200);
114 mpic_assign_isu(mpic, 1, paddr + 0x11000); 104 mpic_assign_isu(mpic, 1, mpic->paddr + 0x11000);
115 105
116 mpic_init(mpic); 106 mpic_init(mpic);
117} 107}
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 6f355821055..baf20a91382 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -234,7 +234,7 @@ static __init void pas_init_IRQ(void)
234 mpic_flags, 0, 0, "PASEMI-OPIC"); 234 mpic_flags, 0, 0, "PASEMI-OPIC");
235 BUG_ON(!mpic); 235 BUG_ON(!mpic);
236 236
237 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000); 237 mpic_assign_isu(mpic, 0, mpic->paddr + 0x10000);
238 mpic_init(mpic); 238 mpic_init(mpic);
239 /* The NMI/MCK source needs to be prio 15 */ 239 /* The NMI/MCK source needs to be prio 15 */
240 if (nmiprop) { 240 if (nmiprop) {