swissChili | e849174 | 2021-04-08 20:38:06 -0700 | [diff] [blame] | 1 | #include <dri/pci/pci.h> |
swissChili | 0d24883 | 2021-04-08 18:16:02 -0700 | [diff] [blame] | 2 | |
3 | ushort pci_config_readw(uchar bus, uchar slot, uchar func, uchar offset) | ||||
4 | { | ||||
5 | struct pci_config_address address = | ||||
6 | { | ||||
swissChili | e849174 | 2021-04-08 20:38:06 -0700 | [diff] [blame] | 7 | .enable = 1, |
swissChili | 0d24883 | 2021-04-08 18:16:02 -0700 | [diff] [blame] | 8 | .bus = bus, |
9 | .device = slot, | ||||
10 | .function = func, | ||||
11 | .offset = offset ^ 0b11, | ||||
12 | }; | ||||
13 | } |