Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/arch/arm/mach-shark/pci.c | |
3 | * | |
4 | * PCI bios-type initialisation for PCI machines | |
5 | * | |
6 | * Bits taken from various places. | |
7 | */ | |
8 | #include <linux/kernel.h> | |
9 | #include <linux/pci.h> | |
10 | #include <linux/init.h> | |
11 | ||
12 | #include <asm/irq.h> | |
13 | #include <asm/mach/pci.h> | |
14 | #include <asm/mach-types.h> | |
15 | ||
16 | static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |
17 | { | |
18 | if (dev->bus->number == 0) | |
19 | if (dev->devfn == 0) return 255; | |
20 | else return 11; | |
21 | else return 255; | |
22 | } | |
23 | ||
24 | extern void __init via82c505_preinit(void); | |
25 | ||
26 | static struct hw_pci shark_pci __initdata = { | |
27 | .setup = via82c505_setup, | |
28 | .swizzle = pci_std_swizzle, | |
29 | .map_irq = shark_map_irq, | |
30 | .nr_controllers = 1, | |
31 | .scan = via82c505_scan_bus, | |
32 | .preinit = via82c505_preinit, | |
33 | }; | |
34 | ||
35 | static int __init shark_pci_init(void) | |
36 | { | |
37 | if (machine_is_shark()) | |
38 | pci_common_init(&shark_pci); | |
39 | return 0; | |
40 | } | |
41 | ||
42 | subsys_initcall(shark_pci_init); |