blob: 89d175ce74d2c3626b838770d250c802f937d4b5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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
16static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
17{
18 if (dev->bus->number == 0)
Andrea Gelminiff4659c2010-05-23 21:55:47 +020019 if (dev->devfn == 0)
20 return 255;
21 else
22 return 11;
23 else
24 return 255;
Linus Torvalds1da177e2005-04-16 15:20:36 -070025}
26
27extern void __init via82c505_preinit(void);
28
29static struct hw_pci shark_pci __initdata = {
30 .setup = via82c505_setup,
Andrea Gelminiff4659c2010-05-23 21:55:47 +020031 .swizzle = pci_std_swizzle,
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 .map_irq = shark_map_irq,
33 .nr_controllers = 1,
34 .scan = via82c505_scan_bus,
35 .preinit = via82c505_preinit,
36};
37
38static int __init shark_pci_init(void)
39{
40 if (machine_is_shark())
41 pci_common_init(&shark_pci);
42 return 0;
43}
44
45subsys_initcall(shark_pci_init);