This source file includes following definitions.
- pci_load_of_ranges
- set_pci_need_domain_info
- set_pci_need_domain_info
- pcibios_assign_all_busses
- pci_proc_domain
- pci_proc_domain
- pci_get_legacy_ide_irq
1
2
3
4
5
6 #ifndef _ASM_PCI_H
7 #define _ASM_PCI_H
8
9 #include <linux/mm.h>
10
11 #ifdef __KERNEL__
12
13
14
15
16
17
18
19 #include <linux/ioport.h>
20 #include <linux/list.h>
21 #include <linux/of.h>
22
23 #ifdef CONFIG_PCI_DRIVERS_LEGACY
24
25
26
27
28
29
30 struct pci_controller {
31 struct list_head list;
32 struct pci_bus *bus;
33 struct device_node *of_node;
34
35 struct pci_ops *pci_ops;
36 struct resource *mem_resource;
37 unsigned long mem_offset;
38 struct resource *io_resource;
39 unsigned long io_offset;
40 unsigned long io_map_base;
41 struct resource *busn_resource;
42
43 #ifndef CONFIG_PCI_DOMAINS_GENERIC
44 unsigned int index;
45
46
47 unsigned int need_domain_info;
48 #endif
49
50
51
52 int (*get_busno)(void);
53 void (*set_busno)(int busno);
54 };
55
56
57
58
59 extern void register_pci_controller(struct pci_controller *hose);
60
61
62
63
64 extern int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
65
66
67 extern int pcibios_plat_dev_init(struct pci_dev *dev);
68
69 extern char * (*pcibios_plat_setup)(char *str);
70
71 #ifdef CONFIG_OF
72
73 extern void pci_load_of_ranges(struct pci_controller *hose,
74 struct device_node *node);
75 #else
76 static inline void pci_load_of_ranges(struct pci_controller *hose,
77 struct device_node *node) {}
78 #endif
79
80 #ifdef CONFIG_PCI_DOMAINS_GENERIC
81 static inline void set_pci_need_domain_info(struct pci_controller *hose,
82 int need_domain_info)
83 {
84
85 }
86 #elif defined(CONFIG_PCI_DOMAINS)
87 static inline void set_pci_need_domain_info(struct pci_controller *hose,
88 int need_domain_info)
89 {
90 hose->need_domain_info = need_domain_info;
91 }
92 #endif
93
94 #endif
95
96
97
98
99 static inline unsigned int pcibios_assign_all_busses(void)
100 {
101 return 1;
102 }
103
104 extern unsigned long PCIBIOS_MIN_IO;
105 extern unsigned long PCIBIOS_MIN_MEM;
106
107 #define PCIBIOS_MIN_CARDBUS_IO 0x4000
108
109 #define HAVE_PCI_MMAP
110 #define ARCH_GENERIC_PCI_MMAP_RESOURCE
111
112
113
114
115
116
117 #include <linux/types.h>
118 #include <linux/slab.h>
119 #include <linux/scatterlist.h>
120 #include <linux/string.h>
121 #include <asm/io.h>
122
123 #ifdef CONFIG_PCI_DOMAINS_GENERIC
124 static inline int pci_proc_domain(struct pci_bus *bus)
125 {
126 return pci_domain_nr(bus);
127 }
128 #elif defined(CONFIG_PCI_DOMAINS)
129 #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
130
131 static inline int pci_proc_domain(struct pci_bus *bus)
132 {
133 struct pci_controller *hose = bus->sysdata;
134 return hose->need_domain_info;
135 }
136 #endif
137
138 #endif
139
140
141 extern int pcibios_plat_dev_init(struct pci_dev *dev);
142
143
144 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
145 {
146 return channel ? 15 : 14;
147 }
148
149 #endif