aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/mips/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/mips/pci
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'Documentation/mips/pci')
-rw-r--r--Documentation/mips/pci/pci.README54
1 files changed, 54 insertions, 0 deletions
diff --git a/Documentation/mips/pci/pci.README b/Documentation/mips/pci/pci.README
new file mode 100644
index 000000000000..8697ee41372d
--- /dev/null
+++ b/Documentation/mips/pci/pci.README
@@ -0,0 +1,54 @@
1
2Pete Popov, ppopov@pacbell.net
307/11/2001
4
5This README briefly explains how to use the pci and pci_auto
6code in arch/mips/kernel. The code was ported from PowerPC and
7modified slightly. It has been tested pretty well on PPC on some
8rather complex systems with multiple bridges and devices behind
9each bridge. However, at the time this README was written, the
10mips port was tested only on boards with a single pci bus and
11no P2P bridges. It's very possible that on boards with P2P
12bridges some modifications have to be made. The code will
13evolve, no doubt, but currently every single mips board
14is doing its own pcibios thing and it has become a big
15mess. This generic pci code is meant to clean up the mips
16pci mess and make it easier to add pci support to new boards.
17
18inside the define for your board in arch/mips/config.in.
19For example, the Galileo EV96100 board looks like this:
20
21if [ "$CONFIG_MIPS_EV96100" = "y" ]; then
22 define_bool CONFIG_PCI y
23 define_bool CONFIG_MIPS_GT96100 y
24 define_bool CONFIG_NEW_PCI y
25 define_bool CONFIG_SWAP_IO_SPACE y
26fi
27
28
29Next, if you want to use the arch/mips/kernel/pci code, which has the
30pcibios_init() function, add
31
32define_bool CONFIG_NEW_PCI y
33
34inside the define for your board. Again, the EV96100 example above
35show NEW_PCI turned on.
36
37
38Now you need to add your files to hook in your pci configuration
39cycles. Usually you'll need only a couple of files named something
40like pci_fixups.c and pci_ops.c. You can copy the templates
41provided and fill in the code.
42
43The file pci_ops.c should contain the pci configuration cycles routines.
44It also has the mips_pci_channels[] array which contains the descriptors
45of each pci controller.
46
47The file pci_fixups.c contains a few routines to do interrupt fixups,
48resources fixups, and, if needed, pci bios fixups.
49
50Usually you'll put your pci_fixups.c file in your board specific directory,
51since the functions in that file are board specific. The functions in
52pci_ops.c, on the other hand, are usually pci controller specific so that
53file could be shared among a few different boards using the same
54pci controller.