This source file includes following definitions.
- gapspci_fixup_resources
- pcibios_map_platform_irq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include <linux/sched.h>
16 #include <linux/kernel.h>
17 #include <linux/param.h>
18 #include <linux/interrupt.h>
19 #include <linux/init.h>
20 #include <linux/irq.h>
21 #include <linux/pci.h>
22 #include <linux/dma-mapping.h>
23
24 #include <asm/io.h>
25 #include <asm/irq.h>
26 #include <mach/pci.h>
27
28 static void gapspci_fixup_resources(struct pci_dev *dev)
29 {
30 struct pci_channel *p = dev->sysdata;
31 struct resource res;
32 struct pci_bus_region region;
33
34 printk(KERN_NOTICE "PCI: Fixing up device %s\n", pci_name(dev));
35
36 switch (dev->device) {
37 case PCI_DEVICE_ID_SEGA_BBA:
38
39
40
41 dev->resource[1].start = p->resources[0].start + 0x100;
42 dev->resource[1].end = dev->resource[1].start + 0x200 - 1;
43
44
45
46
47
48 dev->resource[1].flags |= IORESOURCE_PCI_FIXED;
49
50
51
52
53
54
55
56
57
58
59 res.start = GAPSPCI_DMA_BASE;
60 res.end = GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE - 1;
61 res.flags = IORESOURCE_MEM;
62 pcibios_resource_to_bus(dev->bus, ®ion, &res);
63 BUG_ON(dma_declare_coherent_memory(&dev->dev,
64 res.start,
65 region.start,
66 resource_size(&res)));
67 break;
68 default:
69 printk("PCI: Failed resource fixup\n");
70 }
71 }
72 DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources);
73
74 int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
75 {
76
77
78
79
80
81
82
83 return GAPSPCI_IRQ;
84 }