aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-07-03 03:35:35 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-07-03 03:35:35 -0400
commitb533f8ae796d1ee0289bf04d4f1e72c02ad4a17d (patch)
tree4bec480194b251e18fee511df1cf4840a1995c88 /arch/powerpc/platforms
parenteae98266e78e5659d75dbb62b4601960c15c7830 (diff)
[POWERPC] Reworked interrupt numbers for OpenPIC based Freescale chips
Make the interrupt numbers match the OpenPIC spec intead of the Freescale docs which distinguish between internal and external interrupts. Now we can use the interrupt number directly to find the register offset associated with it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/85xx/mpc8544_ds.c15
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c22
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c23
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c21
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c15
5 files changed, 5 insertions, 91 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c
index bec84ffe708e..6fb90aab879f 100644
--- a/arch/powerpc/platforms/85xx/mpc8544_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c
@@ -61,24 +61,11 @@ void __init mpc8544_ds_pic_init(void)
61 return; 61 return;
62 } 62 }
63 63
64 /* Alloc mpic structure and per isu has 16 INT entries. */
65 mpic = mpic_alloc(np, r.start, 64 mpic = mpic_alloc(np, r.start,
66 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 65 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
67 16, 64, " OPENPIC "); 66 0, 256, " OpenPIC ");
68 BUG_ON(mpic == NULL); 67 BUG_ON(mpic == NULL);
69 68
70 /*
71 * 48 Internal Interrupts
72 */
73 mpic_assign_isu(mpic, 0, r.start + 0x10200);
74 mpic_assign_isu(mpic, 1, r.start + 0x10400);
75 mpic_assign_isu(mpic, 2, r.start + 0x10600);
76
77 /*
78 * 16 External interrupts
79 */
80 mpic_assign_isu(mpic, 3, r.start + 0x10000);
81
82 mpic_init(mpic); 69 mpic_init(mpic);
83 70
84#ifdef CONFIG_PPC_I8259 71#ifdef CONFIG_PPC_I8259
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 1262d1b8a442..7235f702394c 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -87,30 +87,10 @@ static void __init mpc85xx_ads_pic_init(void)
87 87
88 mpic = mpic_alloc(np, r.start, 88 mpic = mpic_alloc(np, r.start,
89 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 89 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
90 4, 0, " OpenPIC "); 90 0, 256, " OpenPIC ");
91 BUG_ON(mpic == NULL); 91 BUG_ON(mpic == NULL);
92 of_node_put(np); 92 of_node_put(np);
93 93
94 mpic_assign_isu(mpic, 0, r.start + 0x10200);
95 mpic_assign_isu(mpic, 1, r.start + 0x10280);
96 mpic_assign_isu(mpic, 2, r.start + 0x10300);
97 mpic_assign_isu(mpic, 3, r.start + 0x10380);
98 mpic_assign_isu(mpic, 4, r.start + 0x10400);
99 mpic_assign_isu(mpic, 5, r.start + 0x10480);
100 mpic_assign_isu(mpic, 6, r.start + 0x10500);
101 mpic_assign_isu(mpic, 7, r.start + 0x10580);
102
103 /* Unused on this platform (leave room for 8548) */
104 mpic_assign_isu(mpic, 8, r.start + 0x10600);
105 mpic_assign_isu(mpic, 9, r.start + 0x10680);
106 mpic_assign_isu(mpic, 10, r.start + 0x10700);
107 mpic_assign_isu(mpic, 11, r.start + 0x10780);
108
109 /* External Interrupts */
110 mpic_assign_isu(mpic, 12, r.start + 0x10000);
111 mpic_assign_isu(mpic, 13, r.start + 0x10080);
112 mpic_assign_isu(mpic, 14, r.start + 0x10100);
113
114 mpic_init(mpic); 94 mpic_init(mpic);
115 95
116#ifdef CONFIG_CPM2 96#ifdef CONFIG_CPM2
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 04a1eaa81bbe..2a80c1d0afbc 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -156,33 +156,12 @@ static void __init mpc85xx_cds_pic_init(void)
156 156
157 mpic = mpic_alloc(np, r.start, 157 mpic = mpic_alloc(np, r.start,
158 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 158 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
159 4, 0, " OpenPIC "); 159 0, 256, " OpenPIC ");
160 BUG_ON(mpic == NULL); 160 BUG_ON(mpic == NULL);
161 161
162 /* Return the mpic node */ 162 /* Return the mpic node */
163 of_node_put(np); 163 of_node_put(np);
164 164
165 mpic_assign_isu(mpic, 0, r.start + 0x10200);
166 mpic_assign_isu(mpic, 1, r.start + 0x10280);
167 mpic_assign_isu(mpic, 2, r.start + 0x10300);
168 mpic_assign_isu(mpic, 3, r.start + 0x10380);
169 mpic_assign_isu(mpic, 4, r.start + 0x10400);
170 mpic_assign_isu(mpic, 5, r.start + 0x10480);
171 mpic_assign_isu(mpic, 6, r.start + 0x10500);
172 mpic_assign_isu(mpic, 7, r.start + 0x10580);
173
174 /* Used only for 8548 so far, but no harm in
175 * allocating them for everyone */
176 mpic_assign_isu(mpic, 8, r.start + 0x10600);
177 mpic_assign_isu(mpic, 9, r.start + 0x10680);
178 mpic_assign_isu(mpic, 10, r.start + 0x10700);
179 mpic_assign_isu(mpic, 11, r.start + 0x10780);
180
181 /* External Interrupts */
182 mpic_assign_isu(mpic, 12, r.start + 0x10000);
183 mpic_assign_isu(mpic, 13, r.start + 0x10080);
184 mpic_assign_isu(mpic, 14, r.start + 0x10100);
185
186 mpic_init(mpic); 165 mpic_init(mpic);
187 166
188#ifdef CONFIG_PPC_I8259 167#ifdef CONFIG_PPC_I8259
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index f55ef5b94f73..004b80bd0b84 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -176,29 +176,10 @@ static void __init mpc85xx_mds_pic_init(void)
176 176
177 mpic = mpic_alloc(np, r.start, 177 mpic = mpic_alloc(np, r.start,
178 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 178 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
179 4, 0, " OpenPIC "); 179 0, 256, " OpenPIC ");
180 BUG_ON(mpic == NULL); 180 BUG_ON(mpic == NULL);
181 of_node_put(np); 181 of_node_put(np);
182 182
183 /* Internal Interrupts */
184 mpic_assign_isu(mpic, 0, r.start + 0x10200);
185 mpic_assign_isu(mpic, 1, r.start + 0x10280);
186 mpic_assign_isu(mpic, 2, r.start + 0x10300);
187 mpic_assign_isu(mpic, 3, r.start + 0x10380);
188 mpic_assign_isu(mpic, 4, r.start + 0x10400);
189 mpic_assign_isu(mpic, 5, r.start + 0x10480);
190 mpic_assign_isu(mpic, 6, r.start + 0x10500);
191 mpic_assign_isu(mpic, 7, r.start + 0x10580);
192 mpic_assign_isu(mpic, 8, r.start + 0x10600);
193 mpic_assign_isu(mpic, 9, r.start + 0x10680);
194 mpic_assign_isu(mpic, 10, r.start + 0x10700);
195 mpic_assign_isu(mpic, 11, r.start + 0x10780);
196
197 /* External Interrupts */
198 mpic_assign_isu(mpic, 12, r.start + 0x10000);
199 mpic_assign_isu(mpic, 13, r.start + 0x10080);
200 mpic_assign_isu(mpic, 14, r.start + 0x10100);
201
202 mpic_init(mpic); 183 mpic_init(mpic);
203 184
204#ifdef CONFIG_QUICC_ENGINE 185#ifdef CONFIG_QUICC_ENGINE
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 62b8a14213e7..5b01ec7c13dc 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -74,22 +74,9 @@ mpc86xx_hpcn_init_irq(void)
74 /* Alloc mpic structure and per isu has 16 INT entries. */ 74 /* Alloc mpic structure and per isu has 16 INT entries. */
75 mpic1 = mpic_alloc(np, res.start, 75 mpic1 = mpic_alloc(np, res.start,
76 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 76 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
77 16, NR_IRQS - 4, 77 0, 256, " MPIC ");
78 " MPIC ");
79 BUG_ON(mpic1 == NULL); 78 BUG_ON(mpic1 == NULL);
80 79
81 mpic_assign_isu(mpic1, 0, res.start + 0x10000);
82
83 /* 48 Internal Interrupts */
84 mpic_assign_isu(mpic1, 1, res.start + 0x10200);
85 mpic_assign_isu(mpic1, 2, res.start + 0x10400);
86 mpic_assign_isu(mpic1, 3, res.start + 0x10600);
87
88 /* 16 External interrupts
89 * Moving them from [0 - 15] to [64 - 79]
90 */
91 mpic_assign_isu(mpic1, 4, res.start + 0x10000);
92
93 mpic_init(mpic1); 80 mpic_init(mpic1);
94 81
95#ifdef CONFIG_PCI 82#ifdef CONFIG_PCI