aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/prom.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-16 17:11:43 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-16 17:11:43 -0400
commit2e57572a50a4de41c6cbc879a4866a312d4cd316 (patch)
treec4f58ec96c06642c4b415b881d3f0a3b673d5b44 /arch/sparc64/kernel/prom.c
parent9b2e43ae4e9609f80034dfe8de895045cac52d77 (diff)
parentf948cc6ab9e61a8e88d70ee9aafc690e6d26f92c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts: arch/sparc64/kernel/pci_psycho.c
Diffstat (limited to 'arch/sparc64/kernel/prom.c')
-rw-r--r--arch/sparc64/kernel/prom.c104
1 files changed, 6 insertions, 98 deletions
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 5f50e2b17a8f..dbba82f9b142 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -162,55 +162,11 @@ static unsigned long psycho_pcislot_imap_offset(unsigned long ino)
162 return PSYCHO_IMAP_B_SLOT0 + (slot * 8); 162 return PSYCHO_IMAP_B_SLOT0 + (slot * 8);
163} 163}
164 164
165#define PSYCHO_IMAP_SCSI 0x1000UL 165#define PSYCHO_OBIO_IMAP_BASE 0x1000UL
166#define PSYCHO_IMAP_ETH 0x1008UL 166
167#define PSYCHO_IMAP_BPP 0x1010UL
168#define PSYCHO_IMAP_AU_REC 0x1018UL
169#define PSYCHO_IMAP_AU_PLAY 0x1020UL
170#define PSYCHO_IMAP_PFAIL 0x1028UL
171#define PSYCHO_IMAP_KMS 0x1030UL
172#define PSYCHO_IMAP_FLPY 0x1038UL
173#define PSYCHO_IMAP_SHW 0x1040UL
174#define PSYCHO_IMAP_KBD 0x1048UL
175#define PSYCHO_IMAP_MS 0x1050UL
176#define PSYCHO_IMAP_SER 0x1058UL
177#define PSYCHO_IMAP_TIM0 0x1060UL
178#define PSYCHO_IMAP_TIM1 0x1068UL
179#define PSYCHO_IMAP_UE 0x1070UL
180#define PSYCHO_IMAP_CE 0x1078UL
181#define PSYCHO_IMAP_A_ERR 0x1080UL
182#define PSYCHO_IMAP_B_ERR 0x1088UL
183#define PSYCHO_IMAP_PMGMT 0x1090UL
184#define PSYCHO_IMAP_GFX 0x1098UL
185#define PSYCHO_IMAP_EUPA 0x10a0UL
186
187static unsigned long __psycho_onboard_imap_off[] = {
188/*0x20*/ PSYCHO_IMAP_SCSI,
189/*0x21*/ PSYCHO_IMAP_ETH,
190/*0x22*/ PSYCHO_IMAP_BPP,
191/*0x23*/ PSYCHO_IMAP_AU_REC,
192/*0x24*/ PSYCHO_IMAP_AU_PLAY,
193/*0x25*/ PSYCHO_IMAP_PFAIL,
194/*0x26*/ PSYCHO_IMAP_KMS,
195/*0x27*/ PSYCHO_IMAP_FLPY,
196/*0x28*/ PSYCHO_IMAP_SHW,
197/*0x29*/ PSYCHO_IMAP_KBD,
198/*0x2a*/ PSYCHO_IMAP_MS,
199/*0x2b*/ PSYCHO_IMAP_SER,
200/*0x2c*/ PSYCHO_IMAP_TIM0,
201/*0x2d*/ PSYCHO_IMAP_TIM1,
202/*0x2e*/ PSYCHO_IMAP_UE,
203/*0x2f*/ PSYCHO_IMAP_CE,
204/*0x30*/ PSYCHO_IMAP_A_ERR,
205/*0x31*/ PSYCHO_IMAP_B_ERR,
206/*0x32*/ PSYCHO_IMAP_PMGMT,
207/*0x33*/ PSYCHO_IMAP_GFX,
208/*0x34*/ PSYCHO_IMAP_EUPA,
209};
210#define PSYCHO_ONBOARD_IRQ_BASE 0x20 167#define PSYCHO_ONBOARD_IRQ_BASE 0x20
211#define PSYCHO_ONBOARD_IRQ_LAST 0x34
212#define psycho_onboard_imap_offset(__ino) \ 168#define psycho_onboard_imap_offset(__ino) \
213 __psycho_onboard_imap_off[(__ino) - PSYCHO_ONBOARD_IRQ_BASE] 169 (PSYCHO_OBIO_IMAP_BASE + (((__ino) & 0x1f) << 3))
214 170
215#define PSYCHO_ICLR_A_SLOT0 0x1400UL 171#define PSYCHO_ICLR_A_SLOT0 0x1400UL
216#define PSYCHO_ICLR_SCSI 0x1800UL 172#define PSYCHO_ICLR_SCSI 0x1800UL
@@ -234,10 +190,6 @@ static unsigned int psycho_irq_build(struct device_node *dp,
234 imap_off = psycho_pcislot_imap_offset(ino); 190 imap_off = psycho_pcislot_imap_offset(ino);
235 } else { 191 } else {
236 /* Onboard device */ 192 /* Onboard device */
237 if (ino > PSYCHO_ONBOARD_IRQ_LAST) {
238 prom_printf("psycho_irq_build: Wacky INO [%x]\n", ino);
239 prom_halt();
240 }
241 imap_off = psycho_onboard_imap_offset(ino); 193 imap_off = psycho_onboard_imap_offset(ino);
242 } 194 }
243 195
@@ -324,23 +276,6 @@ static void sabre_wsync_handler(unsigned int ino, void *_arg1, void *_arg2)
324 276
325#define SABRE_IMAP_A_SLOT0 0x0c00UL 277#define SABRE_IMAP_A_SLOT0 0x0c00UL
326#define SABRE_IMAP_B_SLOT0 0x0c20UL 278#define SABRE_IMAP_B_SLOT0 0x0c20UL
327#define SABRE_IMAP_SCSI 0x1000UL
328#define SABRE_IMAP_ETH 0x1008UL
329#define SABRE_IMAP_BPP 0x1010UL
330#define SABRE_IMAP_AU_REC 0x1018UL
331#define SABRE_IMAP_AU_PLAY 0x1020UL
332#define SABRE_IMAP_PFAIL 0x1028UL
333#define SABRE_IMAP_KMS 0x1030UL
334#define SABRE_IMAP_FLPY 0x1038UL
335#define SABRE_IMAP_SHW 0x1040UL
336#define SABRE_IMAP_KBD 0x1048UL
337#define SABRE_IMAP_MS 0x1050UL
338#define SABRE_IMAP_SER 0x1058UL
339#define SABRE_IMAP_UE 0x1070UL
340#define SABRE_IMAP_CE 0x1078UL
341#define SABRE_IMAP_PCIERR 0x1080UL
342#define SABRE_IMAP_GFX 0x1098UL
343#define SABRE_IMAP_EUPA 0x10a0UL
344#define SABRE_ICLR_A_SLOT0 0x1400UL 279#define SABRE_ICLR_A_SLOT0 0x1400UL
345#define SABRE_ICLR_B_SLOT0 0x1480UL 280#define SABRE_ICLR_B_SLOT0 0x1480UL
346#define SABRE_ICLR_SCSI 0x1800UL 281#define SABRE_ICLR_SCSI 0x1800UL
@@ -370,33 +305,10 @@ static unsigned long sabre_pcislot_imap_offset(unsigned long ino)
370 return SABRE_IMAP_B_SLOT0 + (slot * 8); 305 return SABRE_IMAP_B_SLOT0 + (slot * 8);
371} 306}
372 307
373static unsigned long __sabre_onboard_imap_off[] = { 308#define SABRE_OBIO_IMAP_BASE 0x1000UL
374/*0x20*/ SABRE_IMAP_SCSI, 309#define SABRE_ONBOARD_IRQ_BASE 0x20
375/*0x21*/ SABRE_IMAP_ETH,
376/*0x22*/ SABRE_IMAP_BPP,
377/*0x23*/ SABRE_IMAP_AU_REC,
378/*0x24*/ SABRE_IMAP_AU_PLAY,
379/*0x25*/ SABRE_IMAP_PFAIL,
380/*0x26*/ SABRE_IMAP_KMS,
381/*0x27*/ SABRE_IMAP_FLPY,
382/*0x28*/ SABRE_IMAP_SHW,
383/*0x29*/ SABRE_IMAP_KBD,
384/*0x2a*/ SABRE_IMAP_MS,
385/*0x2b*/ SABRE_IMAP_SER,
386/*0x2c*/ 0 /* reserved */,
387/*0x2d*/ 0 /* reserved */,
388/*0x2e*/ SABRE_IMAP_UE,
389/*0x2f*/ SABRE_IMAP_CE,
390/*0x30*/ SABRE_IMAP_PCIERR,
391/*0x31*/ 0 /* reserved */,
392/*0x32*/ 0 /* reserved */,
393/*0x33*/ SABRE_IMAP_GFX,
394/*0x34*/ SABRE_IMAP_EUPA,
395};
396#define SABRE_ONBOARD_IRQ_BASE 0x20
397#define SABRE_ONBOARD_IRQ_LAST 0x30
398#define sabre_onboard_imap_offset(__ino) \ 310#define sabre_onboard_imap_offset(__ino) \
399 __sabre_onboard_imap_off[(__ino) - SABRE_ONBOARD_IRQ_BASE] 311 (SABRE_OBIO_IMAP_BASE + (((__ino) & 0x1f) << 3))
400 312
401#define sabre_iclr_offset(ino) \ 313#define sabre_iclr_offset(ino) \
402 ((ino & 0x20) ? (SABRE_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \ 314 ((ino & 0x20) ? (SABRE_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \
@@ -459,10 +371,6 @@ static unsigned int sabre_irq_build(struct device_node *dp,
459 imap_off = sabre_pcislot_imap_offset(ino); 371 imap_off = sabre_pcislot_imap_offset(ino);
460 } else { 372 } else {
461 /* onboard device */ 373 /* onboard device */
462 if (ino > SABRE_ONBOARD_IRQ_LAST) {
463 prom_printf("sabre_irq_build: Wacky INO [%x]\n", ino);
464 prom_halt();
465 }
466 imap_off = sabre_onboard_imap_offset(ino); 374 imap_off = sabre_onboard_imap_offset(ino);
467 } 375 }
468 376