1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * SNI specific PCI support for RM200/RM300.
7  *
8  * Copyright (C) 1997 - 2000 Ralf Baechle
9  */
10 #include <linux/config.h>
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/pci.h>
14 #include <linux/types.h>
15 #include <asm/byteorder.h>
16 #include <asm/sni.h>
17 
18 #if 0
19 /* To do:  Bring this uptodate ...  */
20 static void pcimt_pcibios_fixup (void)
21 {
22 	struct pci_dev *dev;
23 
24 	pci_for_each_dev(dev) {
25 		/*
26 		 * TODO: Take care of RM300 revision D boards for where the
27 		 * network slot became an ordinary PCI slot.
28 		 */
29 		if (dev->devfn == PCI_DEVFN(1, 0)) {
30 			/* Evil hack ...  */
31 			set_c0_config(CONF_CM_CMASK, CONF_CM_CACHABLE_NO_WA);
32 			dev->irq = PCIMT_IRQ_SCSI;
33 			continue;
34 		}
35 		if (dev->devfn == PCI_DEVFN(2, 0)) {
36 			dev->irq = PCIMT_IRQ_ETHERNET;
37 			continue;
38 		}
39 
40 		switch(dev->irq) {
41 		case 1 ... 4:
42 			dev->irq += PCIMT_IRQ_INTA - 1;
43 			break;
44 		case 0:
45 			break;
46 		default:
47 			printk("PCI device on bus %d, dev %d, function %d "
48 			       "impossible interrupt configured.\n",
49 			       dev->bus->number, PCI_SLOT(dev->devfn),
50 			       PCI_SLOT(dev->devfn));
51 		}
52 	}
53 }
54 #endif
55 
56 void __init
pcibios_fixup_bus(struct pci_bus * b)57 pcibios_fixup_bus(struct pci_bus *b)
58 {
59 }
60 
61 extern struct pci_ops sni_pci_ops;
62 
pcibios_init(void)63 void __init pcibios_init(void)
64 {
65 	struct pci_ops *ops = &sni_pci_ops;
66 
67 	pci_scan_bus(0, ops, NULL);
68 }
69 
pcibios_assign_all_busses(void)70 unsigned __init int pcibios_assign_all_busses(void)
71 {
72 	return 0;
73 }
74 
75 struct pci_fixup pcibios_fixups[] = {
76 	{ 0 }
77 };
78