aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/pal4_pci.c
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 /arch/ppc/platforms/pal4_pci.c
Linux-2.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 'arch/ppc/platforms/pal4_pci.c')
-rw-r--r--arch/ppc/platforms/pal4_pci.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/ppc/platforms/pal4_pci.c b/arch/ppc/platforms/pal4_pci.c
new file mode 100644
index 00000000000..c3b1b757a48
--- /dev/null
+++ b/arch/ppc/platforms/pal4_pci.c
@@ -0,0 +1,77 @@
1/*
2 * arch/ppc/platforms/pal4_pci.c
3 *
4 * PCI support for SBS Palomar IV
5 *
6 * Author: Dan Cox
7 *
8 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/pci.h>
17
18#include <asm/byteorder.h>
19#include <asm/machdep.h>
20#include <asm/io.h>
21#include <asm/pci-bridge.h>
22#include <asm/uaccess.h>
23
24#include <syslib/cpc700.h>
25
26#include "pal4.h"
27
28/* not much to this.... */
29static inline int __init
30pal4_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
31{
32 if (idsel == 9)
33 return PAL4_ETH;
34 else
35 return PAL4_INTA + (idsel - 3);
36}
37
38void __init
39pal4_find_bridges(void)
40{
41 struct pci_controller *hose;
42
43 hose = pcibios_alloc_controller();
44 if (!hose)
45 return;
46
47 hose->first_busno = 0;
48 hose->last_busno = 0xff;
49 hose->pci_mem_offset = 0;
50
51 /* Could snatch these from the CPC700.... */
52 pci_init_resource(&hose->io_resource,
53 0x0,
54 0x03ffffff,
55 IORESOURCE_IO,
56 "PCI host bridge");
57
58 pci_init_resource(&hose->mem_resources[0],
59 0x90000000,
60 0x9fffffff,
61 IORESOURCE_MEM,
62 "PCI host bridge");
63
64 hose->io_space.start = 0x00800000;
65 hose->io_space.end = 0x03ffffff;
66 hose->mem_space.start = 0x90000000;
67 hose->mem_space.end = 0x9fffffff;
68 hose->io_base_virt = (void *) 0xf8000000;
69
70 setup_indirect_pci(hose, CPC700_PCI_CONFIG_ADDR,
71 CPC700_PCI_CONFIG_DATA);
72
73 hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
74
75 ppc_md.pci_swizzle = common_swizzle;
76 ppc_md.pci_map_irq = pal4_map_irq;
77}