1 | /* |
---|
2 | * This file is produced automatically. |
---|
3 | * Do not modify anything in here by hand. |
---|
4 | * |
---|
5 | * Created from source file |
---|
6 | * freebsd-org/sys/dev/pci/pcib_if.m |
---|
7 | * with |
---|
8 | * makeobjops.awk |
---|
9 | * |
---|
10 | * See the source file for legal information |
---|
11 | */ |
---|
12 | |
---|
13 | |
---|
14 | #ifndef _pcib_if_h_ |
---|
15 | #define _pcib_if_h_ |
---|
16 | |
---|
17 | |
---|
18 | #include "pci_if.h" |
---|
19 | |
---|
20 | /** @brief Unique descriptor for the PCIB_MAXSLOTS() method */ |
---|
21 | extern struct kobjop_desc pcib_maxslots_desc; |
---|
22 | /** @brief A function implementing the PCIB_MAXSLOTS() method */ |
---|
23 | typedef int pcib_maxslots_t(device_t dev); |
---|
24 | |
---|
25 | static __inline int PCIB_MAXSLOTS(device_t dev) |
---|
26 | { |
---|
27 | kobjop_t _m; |
---|
28 | KOBJOPLOOKUP(((kobj_t)dev)->ops,pcib_maxslots); |
---|
29 | return ((pcib_maxslots_t *) _m)(dev); |
---|
30 | } |
---|
31 | |
---|
32 | /** @brief Unique descriptor for the PCIB_MAXFUNCS() method */ |
---|
33 | extern struct kobjop_desc pcib_maxfuncs_desc; |
---|
34 | /** @brief A function implementing the PCIB_MAXFUNCS() method */ |
---|
35 | typedef int pcib_maxfuncs_t(device_t dev); |
---|
36 | |
---|
37 | static __inline int PCIB_MAXFUNCS(device_t dev) |
---|
38 | { |
---|
39 | kobjop_t _m; |
---|
40 | KOBJOPLOOKUP(((kobj_t)dev)->ops,pcib_maxfuncs); |
---|
41 | return ((pcib_maxfuncs_t *) _m)(dev); |
---|
42 | } |
---|
43 | |
---|
44 | /** @brief Unique descriptor for the PCIB_READ_CONFIG() method */ |
---|
45 | extern struct kobjop_desc pcib_read_config_desc; |
---|
46 | /** @brief A function implementing the PCIB_READ_CONFIG() method */ |
---|
47 | typedef u_int32_t pcib_read_config_t(device_t dev, u_int bus, u_int slot, |
---|
48 | u_int func, u_int reg, int width); |
---|
49 | |
---|
50 | static __inline u_int32_t PCIB_READ_CONFIG(device_t dev, u_int bus, u_int slot, |
---|
51 | u_int func, u_int reg, int width) |
---|
52 | { |
---|
53 | kobjop_t _m; |
---|
54 | KOBJOPLOOKUP(((kobj_t)dev)->ops,pcib_read_config); |
---|
55 | return ((pcib_read_config_t *) _m)(dev, bus, slot, func, reg, width); |
---|
56 | } |
---|
57 | |
---|
58 | /** @brief Unique descriptor for the PCIB_WRITE_CONFIG() method */ |
---|
59 | extern struct kobjop_desc pcib_write_config_desc; |
---|
60 | /** @brief A function implementing the PCIB_WRITE_CONFIG() method */ |
---|
61 | typedef void pcib_write_config_t(device_t dev, u_int bus, u_int slot, |
---|
62 | u_int func, u_int reg, u_int32_t value, |
---|
63 | int width); |
---|
64 | |
---|
65 | static __inline void PCIB_WRITE_CONFIG(device_t dev, u_int bus, u_int slot, |
---|
66 | u_int func, u_int reg, u_int32_t value, |
---|
67 | int width) |
---|
68 | { |
---|
69 | kobjop_t _m; |
---|
70 | KOBJOPLOOKUP(((kobj_t)dev)->ops,pcib_write_config); |
---|
71 | ((pcib_write_config_t *) _m)(dev, bus, slot, func, reg, value, width); |
---|
72 | } |
---|
73 | |
---|
74 | /** @brief Unique descriptor for the PCIB_ROUTE_INTERRUPT() method */ |
---|
75 | extern struct kobjop_desc pcib_route_interrupt_desc; |
---|
76 | /** @brief A function implementing the PCIB_ROUTE_INTERRUPT() method */ |
---|
77 | typedef int pcib_route_interrupt_t(device_t pcib, device_t dev, int pin); |
---|
78 | |
---|
79 | static __inline int PCIB_ROUTE_INTERRUPT(device_t pcib, device_t dev, int pin) |
---|
80 | { |
---|
81 | kobjop_t _m; |
---|
82 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_route_interrupt); |
---|
83 | return ((pcib_route_interrupt_t *) _m)(pcib, dev, pin); |
---|
84 | } |
---|
85 | |
---|
86 | /** @brief Unique descriptor for the PCIB_ALLOC_MSI() method */ |
---|
87 | extern struct kobjop_desc pcib_alloc_msi_desc; |
---|
88 | /** @brief A function implementing the PCIB_ALLOC_MSI() method */ |
---|
89 | typedef int pcib_alloc_msi_t(device_t pcib, device_t dev, int count, |
---|
90 | int maxcount, int *irqs); |
---|
91 | |
---|
92 | static __inline int PCIB_ALLOC_MSI(device_t pcib, device_t dev, int count, |
---|
93 | int maxcount, int *irqs) |
---|
94 | { |
---|
95 | kobjop_t _m; |
---|
96 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_alloc_msi); |
---|
97 | return ((pcib_alloc_msi_t *) _m)(pcib, dev, count, maxcount, irqs); |
---|
98 | } |
---|
99 | |
---|
100 | /** @brief Unique descriptor for the PCIB_RELEASE_MSI() method */ |
---|
101 | extern struct kobjop_desc pcib_release_msi_desc; |
---|
102 | /** @brief A function implementing the PCIB_RELEASE_MSI() method */ |
---|
103 | typedef int pcib_release_msi_t(device_t pcib, device_t dev, int count, |
---|
104 | int *irqs); |
---|
105 | |
---|
106 | static __inline int PCIB_RELEASE_MSI(device_t pcib, device_t dev, int count, |
---|
107 | int *irqs) |
---|
108 | { |
---|
109 | kobjop_t _m; |
---|
110 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_release_msi); |
---|
111 | return ((pcib_release_msi_t *) _m)(pcib, dev, count, irqs); |
---|
112 | } |
---|
113 | |
---|
114 | /** @brief Unique descriptor for the PCIB_ALLOC_MSIX() method */ |
---|
115 | extern struct kobjop_desc pcib_alloc_msix_desc; |
---|
116 | /** @brief A function implementing the PCIB_ALLOC_MSIX() method */ |
---|
117 | typedef int pcib_alloc_msix_t(device_t pcib, device_t dev, int *irq); |
---|
118 | |
---|
119 | static __inline int PCIB_ALLOC_MSIX(device_t pcib, device_t dev, int *irq) |
---|
120 | { |
---|
121 | kobjop_t _m; |
---|
122 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_alloc_msix); |
---|
123 | return ((pcib_alloc_msix_t *) _m)(pcib, dev, irq); |
---|
124 | } |
---|
125 | |
---|
126 | /** @brief Unique descriptor for the PCIB_RELEASE_MSIX() method */ |
---|
127 | extern struct kobjop_desc pcib_release_msix_desc; |
---|
128 | /** @brief A function implementing the PCIB_RELEASE_MSIX() method */ |
---|
129 | typedef int pcib_release_msix_t(device_t pcib, device_t dev, int irq); |
---|
130 | |
---|
131 | static __inline int PCIB_RELEASE_MSIX(device_t pcib, device_t dev, int irq) |
---|
132 | { |
---|
133 | kobjop_t _m; |
---|
134 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_release_msix); |
---|
135 | return ((pcib_release_msix_t *) _m)(pcib, dev, irq); |
---|
136 | } |
---|
137 | |
---|
138 | /** @brief Unique descriptor for the PCIB_MAP_MSI() method */ |
---|
139 | extern struct kobjop_desc pcib_map_msi_desc; |
---|
140 | /** @brief A function implementing the PCIB_MAP_MSI() method */ |
---|
141 | typedef int pcib_map_msi_t(device_t pcib, device_t dev, int irq, uint64_t *addr, |
---|
142 | uint32_t *data); |
---|
143 | |
---|
144 | static __inline int PCIB_MAP_MSI(device_t pcib, device_t dev, int irq, |
---|
145 | uint64_t *addr, uint32_t *data) |
---|
146 | { |
---|
147 | kobjop_t _m; |
---|
148 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_map_msi); |
---|
149 | return ((pcib_map_msi_t *) _m)(pcib, dev, irq, addr, data); |
---|
150 | } |
---|
151 | |
---|
152 | /** @brief Unique descriptor for the PCIB_POWER_FOR_SLEEP() method */ |
---|
153 | extern struct kobjop_desc pcib_power_for_sleep_desc; |
---|
154 | /** @brief A function implementing the PCIB_POWER_FOR_SLEEP() method */ |
---|
155 | typedef int pcib_power_for_sleep_t(device_t pcib, device_t dev, int *pstate); |
---|
156 | |
---|
157 | static __inline int PCIB_POWER_FOR_SLEEP(device_t pcib, device_t dev, |
---|
158 | int *pstate) |
---|
159 | { |
---|
160 | kobjop_t _m; |
---|
161 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_power_for_sleep); |
---|
162 | return ((pcib_power_for_sleep_t *) _m)(pcib, dev, pstate); |
---|
163 | } |
---|
164 | |
---|
165 | /** @brief Unique descriptor for the PCIB_GET_ID() method */ |
---|
166 | extern struct kobjop_desc pcib_get_id_desc; |
---|
167 | /** @brief A function implementing the PCIB_GET_ID() method */ |
---|
168 | typedef int pcib_get_id_t(device_t pcib, device_t dev, enum pci_id_type type, |
---|
169 | uintptr_t *id); |
---|
170 | |
---|
171 | static __inline int PCIB_GET_ID(device_t pcib, device_t dev, |
---|
172 | enum pci_id_type type, uintptr_t *id) |
---|
173 | { |
---|
174 | kobjop_t _m; |
---|
175 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_get_id); |
---|
176 | return ((pcib_get_id_t *) _m)(pcib, dev, type, id); |
---|
177 | } |
---|
178 | |
---|
179 | /** @brief Unique descriptor for the PCIB_TRY_ENABLE_ARI() method */ |
---|
180 | extern struct kobjop_desc pcib_try_enable_ari_desc; |
---|
181 | /** @brief A function implementing the PCIB_TRY_ENABLE_ARI() method */ |
---|
182 | typedef int pcib_try_enable_ari_t(device_t pcib, device_t dev); |
---|
183 | |
---|
184 | static __inline int PCIB_TRY_ENABLE_ARI(device_t pcib, device_t dev) |
---|
185 | { |
---|
186 | kobjop_t _m; |
---|
187 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_try_enable_ari); |
---|
188 | return ((pcib_try_enable_ari_t *) _m)(pcib, dev); |
---|
189 | } |
---|
190 | |
---|
191 | /** @brief Unique descriptor for the PCIB_ARI_ENABLED() method */ |
---|
192 | extern struct kobjop_desc pcib_ari_enabled_desc; |
---|
193 | /** @brief A function implementing the PCIB_ARI_ENABLED() method */ |
---|
194 | typedef int pcib_ari_enabled_t(device_t pcib); |
---|
195 | |
---|
196 | static __inline int PCIB_ARI_ENABLED(device_t pcib) |
---|
197 | { |
---|
198 | kobjop_t _m; |
---|
199 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_ari_enabled); |
---|
200 | return ((pcib_ari_enabled_t *) _m)(pcib); |
---|
201 | } |
---|
202 | |
---|
203 | /** @brief Unique descriptor for the PCIB_DECODE_RID() method */ |
---|
204 | extern struct kobjop_desc pcib_decode_rid_desc; |
---|
205 | /** @brief A function implementing the PCIB_DECODE_RID() method */ |
---|
206 | typedef void pcib_decode_rid_t(device_t pcib, uint16_t rid, int *bus, int *slot, |
---|
207 | int *func); |
---|
208 | |
---|
209 | static __inline void PCIB_DECODE_RID(device_t pcib, uint16_t rid, int *bus, |
---|
210 | int *slot, int *func) |
---|
211 | { |
---|
212 | kobjop_t _m; |
---|
213 | KOBJOPLOOKUP(((kobj_t)pcib)->ops,pcib_decode_rid); |
---|
214 | ((pcib_decode_rid_t *) _m)(pcib, rid, bus, slot, func); |
---|
215 | } |
---|
216 | |
---|
217 | #endif /* _pcib_if_h_ */ |
---|