Commit 7873b49
PCI: dwc: endpoint: Add multiple PFs support for dbi2
The commit 24ede43 ("PCI: designware-ep: Add multiple PFs support
for DWC") added .func_conf_select() to get the configuration space of
different PFs and assumed that the offsets between dbi and dbi2 would
be the same.
However, Renesas R-Car Gen4 PCIe controllers have different offsets of
function 1: dbi (+0x1000) and dbi2 (+0x800). To get the offset for dbi2,
add .get_dbi2_offset() and dw_pcie_ep_get_dbi2_offset().
Note:
- .func_conf_select() should be renamed later.
- dw_pcie_ep_get_dbi2_offset() will call .func_conf_select()
if .get_dbi2_offset() doesn't exist for backward compatibility.
- dw_pcie_writeX_{dbi/dbi2} APIs accepted the func_no argument,
so that these offset calculations are contained in the API
definitions itself as it should.
Link: https://lore.kernel.org/linux-pci/20231018085631.1121289-6-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>1 parent 1a97454 commit 7873b49
2 files changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
58 | | - | |
59 | | - | |
| 70 | + | |
60 | 71 | | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
| 78 | + | |
65 | 79 | | |
66 | | - | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | | - | |
| 83 | + | |
70 | 84 | | |
71 | 85 | | |
72 | 86 | | |
| |||
228 | 242 | | |
229 | 243 | | |
230 | 244 | | |
| 245 | + | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
234 | | - | |
| 249 | + | |
235 | 250 | | |
236 | | - | |
237 | 251 | | |
238 | 252 | | |
| 253 | + | |
239 | 254 | | |
240 | 255 | | |
| 256 | + | |
241 | 257 | | |
242 | 258 | | |
243 | 259 | | |
| |||
253 | 269 | | |
254 | 270 | | |
255 | 271 | | |
256 | | - | |
| 272 | + | |
257 | 273 | | |
258 | 274 | | |
259 | 275 | | |
260 | | - | |
| 276 | + | |
261 | 277 | | |
262 | 278 | | |
263 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
0 commit comments