diff options
-rw-r--r-- | arch/powerpc/platforms/iseries/call_pci.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/iseries/call_pci.h b/arch/powerpc/platforms/iseries/call_pci.h index 59d4e0ad5cf3..dbdf69850ed9 100644 --- a/arch/powerpc/platforms/iseries/call_pci.h +++ b/arch/powerpc/platforms/iseries/call_pci.h | |||
@@ -145,6 +145,25 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, | |||
145 | return retVal.rc; | 145 | return retVal.rc; |
146 | } | 146 | } |
147 | 147 | ||
148 | static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, | ||
149 | u8 deviceId, u32 offset, u32 *value) | ||
150 | { | ||
151 | struct HvCallPci_DsaAddr dsa; | ||
152 | struct HvCallPci_LoadReturn retVal; | ||
153 | |||
154 | *((u64*)&dsa) = 0; | ||
155 | |||
156 | dsa.busNumber = busNumber; | ||
157 | dsa.subBusNumber = subBusNumber; | ||
158 | dsa.deviceId = deviceId; | ||
159 | |||
160 | HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0); | ||
161 | |||
162 | *value = retVal.value; | ||
163 | |||
164 | return retVal.rc; | ||
165 | } | ||
166 | |||
148 | static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, | 167 | static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, |
149 | u8 deviceId, u32 offset, u8 value) | 168 | u8 deviceId, u32 offset, u8 value) |
150 | { | 169 | { |