diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-10-14 02:49:58 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-10-14 02:49:58 -0400 |
commit | 20f48ccfa015d8b8391bbf07fc27618453f44969 (patch) | |
tree | 0a38839fb3c8899fe1eb3026a29daaabec65babc /include | |
parent | bffa8fc3835b0d3c4a59af8aceeea3aba823b032 (diff) |
powerpc: eliminate DsaAddr from pci_dn
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallPci.h | 243 | ||||
-rw-r--r-- | include/asm-ppc64/pci-bridge.h | 3 |
2 files changed, 0 insertions, 246 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallPci.h b/include/asm-ppc64/iSeries/HvCallPci.h index c8d675c40f5e..17b4840b64b2 100644 --- a/include/asm-ppc64/iSeries/HvCallPci.h +++ b/include/asm-ppc64/iSeries/HvCallPci.h | |||
@@ -126,25 +126,6 @@ enum HvCallPci_VpdType { | |||
126 | #define HvCallPciUnmaskInterrupts HvCallPci + 49 | 126 | #define HvCallPciUnmaskInterrupts HvCallPci + 49 |
127 | #define HvCallPciGetBusUnitInfo HvCallPci + 50 | 127 | #define HvCallPciGetBusUnitInfo HvCallPci + 50 |
128 | 128 | ||
129 | static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber, | ||
130 | u8 deviceId, u32 offset, u8 *value) | ||
131 | { | ||
132 | struct HvCallPci_DsaAddr dsa; | ||
133 | struct HvCallPci_LoadReturn retVal; | ||
134 | |||
135 | *((u64*)&dsa) = 0; | ||
136 | |||
137 | dsa.busNumber = busNumber; | ||
138 | dsa.subBusNumber = subBusNumber; | ||
139 | dsa.deviceId = deviceId; | ||
140 | |||
141 | HvCall3Ret16(HvCallPciConfigLoad8, &retVal, *(u64 *)&dsa, offset, 0); | ||
142 | |||
143 | *value = retVal.value; | ||
144 | |||
145 | return retVal.rc; | ||
146 | } | ||
147 | |||
148 | static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, | 129 | static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, |
149 | u8 deviceId, u32 offset, u16 *value) | 130 | u8 deviceId, u32 offset, u16 *value) |
150 | { | 131 | { |
@@ -164,25 +145,6 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, | |||
164 | return retVal.rc; | 145 | return retVal.rc; |
165 | } | 146 | } |
166 | 147 | ||
167 | static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, | ||
168 | u8 deviceId, u32 offset, u32 *value) | ||
169 | { | ||
170 | struct HvCallPci_DsaAddr dsa; | ||
171 | struct HvCallPci_LoadReturn retVal; | ||
172 | |||
173 | *((u64*)&dsa) = 0; | ||
174 | |||
175 | dsa.busNumber = busNumber; | ||
176 | dsa.subBusNumber = subBusNumber; | ||
177 | dsa.deviceId = deviceId; | ||
178 | |||
179 | HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0); | ||
180 | |||
181 | *value = retVal.value; | ||
182 | |||
183 | return retVal.rc; | ||
184 | } | ||
185 | |||
186 | static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, | 148 | static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, |
187 | u8 deviceId, u32 offset, u8 value) | 149 | u8 deviceId, u32 offset, u8 value) |
188 | { | 150 | { |
@@ -197,186 +159,6 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, | |||
197 | return HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0); | 159 | return HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0); |
198 | } | 160 | } |
199 | 161 | ||
200 | static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber, | ||
201 | u8 deviceId, u32 offset, u16 value) | ||
202 | { | ||
203 | struct HvCallPci_DsaAddr dsa; | ||
204 | |||
205 | *((u64*)&dsa) = 0; | ||
206 | |||
207 | dsa.busNumber = busNumber; | ||
208 | dsa.subBusNumber = subBusNumber; | ||
209 | dsa.deviceId = deviceId; | ||
210 | |||
211 | return HvCall4(HvCallPciConfigStore16, *(u64 *)&dsa, offset, value, 0); | ||
212 | } | ||
213 | |||
214 | static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber, | ||
215 | u8 deviceId, u32 offset, u32 value) | ||
216 | { | ||
217 | struct HvCallPci_DsaAddr dsa; | ||
218 | |||
219 | *((u64*)&dsa) = 0; | ||
220 | |||
221 | dsa.busNumber = busNumber; | ||
222 | dsa.subBusNumber = subBusNumber; | ||
223 | dsa.deviceId = deviceId; | ||
224 | |||
225 | return HvCall4(HvCallPciConfigStore32, *(u64 *)&dsa, offset, value, 0); | ||
226 | } | ||
227 | |||
228 | static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm, | ||
229 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
230 | u8 *valueParm) | ||
231 | { | ||
232 | struct HvCallPci_DsaAddr dsa; | ||
233 | struct HvCallPci_LoadReturn retVal; | ||
234 | |||
235 | *((u64*)&dsa) = 0; | ||
236 | |||
237 | dsa.busNumber = busNumberParm; | ||
238 | dsa.subBusNumber = subBusParm; | ||
239 | dsa.deviceId = deviceIdParm; | ||
240 | dsa.barNumber = barNumberParm; | ||
241 | |||
242 | HvCall3Ret16(HvCallPciBarLoad8, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
243 | |||
244 | *valueParm = retVal.value; | ||
245 | |||
246 | return retVal.rc; | ||
247 | } | ||
248 | |||
249 | static inline u64 HvCallPci_barLoad16(u16 busNumberParm, u8 subBusParm, | ||
250 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
251 | u16 *valueParm) | ||
252 | { | ||
253 | struct HvCallPci_DsaAddr dsa; | ||
254 | struct HvCallPci_LoadReturn retVal; | ||
255 | |||
256 | *((u64*)&dsa) = 0; | ||
257 | |||
258 | dsa.busNumber = busNumberParm; | ||
259 | dsa.subBusNumber = subBusParm; | ||
260 | dsa.deviceId = deviceIdParm; | ||
261 | dsa.barNumber = barNumberParm; | ||
262 | |||
263 | HvCall3Ret16(HvCallPciBarLoad16, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
264 | |||
265 | *valueParm = retVal.value; | ||
266 | |||
267 | return retVal.rc; | ||
268 | } | ||
269 | |||
270 | static inline u64 HvCallPci_barLoad32(u16 busNumberParm, u8 subBusParm, | ||
271 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
272 | u32 *valueParm) | ||
273 | { | ||
274 | struct HvCallPci_DsaAddr dsa; | ||
275 | struct HvCallPci_LoadReturn retVal; | ||
276 | |||
277 | *((u64*)&dsa) = 0; | ||
278 | |||
279 | dsa.busNumber = busNumberParm; | ||
280 | dsa.subBusNumber = subBusParm; | ||
281 | dsa.deviceId = deviceIdParm; | ||
282 | dsa.barNumber = barNumberParm; | ||
283 | |||
284 | HvCall3Ret16(HvCallPciBarLoad32, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
285 | |||
286 | *valueParm = retVal.value; | ||
287 | |||
288 | return retVal.rc; | ||
289 | } | ||
290 | |||
291 | static inline u64 HvCallPci_barLoad64(u16 busNumberParm, u8 subBusParm, | ||
292 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
293 | u64 *valueParm) | ||
294 | { | ||
295 | struct HvCallPci_DsaAddr dsa; | ||
296 | struct HvCallPci_LoadReturn retVal; | ||
297 | |||
298 | *((u64*)&dsa) = 0; | ||
299 | |||
300 | dsa.busNumber = busNumberParm; | ||
301 | dsa.subBusNumber = subBusParm; | ||
302 | dsa.deviceId = deviceIdParm; | ||
303 | dsa.barNumber = barNumberParm; | ||
304 | |||
305 | HvCall3Ret16(HvCallPciBarLoad64, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
306 | |||
307 | *valueParm = retVal.value; | ||
308 | |||
309 | return retVal.rc; | ||
310 | } | ||
311 | |||
312 | static inline u64 HvCallPci_barStore8(u16 busNumberParm, u8 subBusParm, | ||
313 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
314 | u8 valueParm) | ||
315 | { | ||
316 | struct HvCallPci_DsaAddr dsa; | ||
317 | |||
318 | *((u64*)&dsa) = 0; | ||
319 | |||
320 | dsa.busNumber = busNumberParm; | ||
321 | dsa.subBusNumber = subBusParm; | ||
322 | dsa.deviceId = deviceIdParm; | ||
323 | dsa.barNumber = barNumberParm; | ||
324 | |||
325 | return HvCall4(HvCallPciBarStore8, *(u64 *)&dsa, offsetParm, | ||
326 | valueParm, 0); | ||
327 | } | ||
328 | |||
329 | static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm, | ||
330 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
331 | u16 valueParm) | ||
332 | { | ||
333 | struct HvCallPci_DsaAddr dsa; | ||
334 | |||
335 | *((u64*)&dsa) = 0; | ||
336 | |||
337 | dsa.busNumber = busNumberParm; | ||
338 | dsa.subBusNumber = subBusParm; | ||
339 | dsa.deviceId = deviceIdParm; | ||
340 | dsa.barNumber = barNumberParm; | ||
341 | |||
342 | return HvCall4(HvCallPciBarStore16, *(u64 *)&dsa, offsetParm, | ||
343 | valueParm, 0); | ||
344 | } | ||
345 | |||
346 | static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm, | ||
347 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
348 | u32 valueParm) | ||
349 | { | ||
350 | struct HvCallPci_DsaAddr dsa; | ||
351 | |||
352 | *((u64*)&dsa) = 0; | ||
353 | |||
354 | dsa.busNumber = busNumberParm; | ||
355 | dsa.subBusNumber = subBusParm; | ||
356 | dsa.deviceId = deviceIdParm; | ||
357 | dsa.barNumber = barNumberParm; | ||
358 | |||
359 | return HvCall4(HvCallPciBarStore32, *(u64 *)&dsa, offsetParm, | ||
360 | valueParm, 0); | ||
361 | } | ||
362 | |||
363 | static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm, | ||
364 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
365 | u64 valueParm) | ||
366 | { | ||
367 | struct HvCallPci_DsaAddr dsa; | ||
368 | |||
369 | *((u64*)&dsa) = 0; | ||
370 | |||
371 | dsa.busNumber = busNumberParm; | ||
372 | dsa.subBusNumber = subBusParm; | ||
373 | dsa.deviceId = deviceIdParm; | ||
374 | dsa.barNumber = barNumberParm; | ||
375 | |||
376 | return HvCall4(HvCallPciBarStore64, *(u64 *)&dsa, offsetParm, | ||
377 | valueParm, 0); | ||
378 | } | ||
379 | |||
380 | static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm, | 162 | static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm, |
381 | u8 deviceIdParm) | 163 | u8 deviceIdParm) |
382 | { | 164 | { |
@@ -437,20 +219,6 @@ static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm, | |||
437 | return HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask); | 219 | return HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask); |
438 | } | 220 | } |
439 | 221 | ||
440 | static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm, | ||
441 | u8 deviceIdParm, u64 onNotOff) | ||
442 | { | ||
443 | struct HvCallPci_DsaAddr dsa; | ||
444 | |||
445 | *((u64*)&dsa) = 0; | ||
446 | |||
447 | dsa.busNumber = busNumberParm; | ||
448 | dsa.subBusNumber = subBusParm; | ||
449 | dsa.deviceId = deviceIdParm; | ||
450 | |||
451 | return HvCall2(HvCallPciSetSlotReset, *(u64*)&dsa, onNotOff); | ||
452 | } | ||
453 | |||
454 | static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm, | 222 | static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm, |
455 | u8 deviceNumberParm, u64 parms, u32 sizeofParms) | 223 | u8 deviceNumberParm, u64 parms, u32 sizeofParms) |
456 | { | 224 | { |
@@ -519,15 +287,4 @@ static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, | |||
519 | return xRc & 0xFFFF; | 287 | return xRc & 0xFFFF; |
520 | } | 288 | } |
521 | 289 | ||
522 | static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, | ||
523 | u16 sizeParm) | ||
524 | { | ||
525 | u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, | ||
526 | sizeParm, HvCallPci_BusAdapterVpd); | ||
527 | if (xRc == -1) | ||
528 | return -1; | ||
529 | else | ||
530 | return xRc & 0xFFFF; | ||
531 | } | ||
532 | |||
533 | #endif /* _HVCALLPCI_H */ | 290 | #endif /* _HVCALLPCI_H */ |
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index 01bffca61f89..0474bdbf556c 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
@@ -77,9 +77,6 @@ struct pci_dn { | |||
77 | struct device_node *node; /* back-pointer to the device_node */ | 77 | struct device_node *node; /* back-pointer to the device_node */ |
78 | #ifdef CONFIG_PPC_ISERIES | 78 | #ifdef CONFIG_PPC_ISERIES |
79 | struct list_head Device_List; | 79 | struct list_head Device_List; |
80 | union HvDsaMap DsaAddr; /* Direct Select Address */ | ||
81 | /* busNumber, subBusNumber, */ | ||
82 | /* deviceId, barNumber */ | ||
83 | int Irq; /* Assigned IRQ */ | 80 | int Irq; /* Assigned IRQ */ |
84 | int Flags; /* Possible flags(disable/bist)*/ | 81 | int Flags; /* Possible flags(disable/bist)*/ |
85 | u8 LogicalSlot; /* Hv Slot Index for Tces */ | 82 | u8 LogicalSlot; /* Hv Slot Index for Tces */ |