2 * arch/ppc/platforms/pal4_pci.c
4 * PCI support for SBS Palomar IV
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
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/pci.h>
18 #include <asm/byteorder.h>
19 #include <asm/machdep.h>
21 #include <asm/pci-bridge.h>
22 #include <asm/uaccess.h>
24 #include <syslib/cpc700.h>
28 /* not much to this.... */
29 static inline int __init
30 pal4_map_irq(struct pci_dev
*dev
, unsigned char idsel
, unsigned char pin
)
35 return PAL4_INTA
+ (idsel
- 3);
39 pal4_find_bridges(void)
41 struct pci_controller
*hose
;
43 hose
= pcibios_alloc_controller();
47 hose
->first_busno
= 0;
48 hose
->last_busno
= 0xff;
49 hose
->pci_mem_offset
= 0;
51 /* Could snatch these from the CPC700.... */
52 pci_init_resource(&hose
->io_resource
,
58 pci_init_resource(&hose
->mem_resources
[0],
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;
70 setup_indirect_pci(hose
, CPC700_PCI_CONFIG_ADDR
,
71 CPC700_PCI_CONFIG_DATA
);
73 hose
->last_busno
= pciauto_bus_scan(hose
, hose
->first_busno
);
75 ppc_md
.pci_swizzle
= common_swizzle
;
76 ppc_md
.pci_map_irq
= pal4_map_irq
;