29 #define PCI_BUSDEVFN( segment, bus, slot, func ) \ 30 ( ( (segment) << 16 ) | ( (bus) << 8 ) | \ 31 ( (slot) << 3 ) | ( (func) << 0 ) ) 40 #define PCIAPI_INLINE( _subsys, _api_func ) \ 41 SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func ) 50 #define PROVIDE_PCIAPI( _subsys, _api_func, _func ) \ 51 PROVIDE_SINGLE_API ( PCIAPI_PREFIX_ ## _subsys, _api_func, _func ) 59 #define PROVIDE_PCIAPI_INLINE( _subsys, _api_func ) \ 60 PROVIDE_SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func ) 70 #include <bits/pci_io.h> 179 #define PCI_APIS __table ( struct pci_api, "pci_apis" ) 189 #define __pci_api( priority ) __table_entry ( PCI_APIS, priority ) 191 #define __pci_api( priority ) 195 #define PCIAPI_PRIORITY_EFI 01 196 #define PCIAPI_PRIORITY_ECAM 02 197 #define PCIAPI_PRIORITY_PCBIOS 03 198 #define PCIAPI_PRIORITY_DIRECT 04 201 #define PROVIDE_PCIAPI_RUNTIME( subsys, priority ) \ 202 struct pci_api pciapi_ ## subsys __pci_api ( priority ) = { \ 204 .pci_can_probe = PCIAPI_INLINE ( subsys, pci_can_probe ), \ 205 .pci_discover = PCIAPI_INLINE ( subsys, pci_discover ), \ 206 .pci_read_config_byte = \ 207 PCIAPI_INLINE ( subsys, pci_read_config_byte ), \ 208 .pci_read_config_word = \ 209 PCIAPI_INLINE ( subsys, pci_read_config_word ), \ 210 .pci_read_config_dword = \ 211 PCIAPI_INLINE ( subsys, pci_read_config_dword ), \ 212 .pci_write_config_byte = \ 213 PCIAPI_INLINE ( subsys, pci_write_config_byte ), \ 214 .pci_write_config_word = \ 215 PCIAPI_INLINE ( subsys, pci_write_config_word ), \ 216 .pci_write_config_dword = \ 217 PCIAPI_INLINE ( subsys, pci_write_config_dword ), \ 218 .pci_ioremap = PCIAPI_INLINE ( subsys, pci_ioremap ), \
uint32_t start
Starting bus:dev.fn address.
typeof() pci_discover * pci_discover
struct pci_range range
PCI bus:dev.fn address range.
typeof() pci_read_config_word * pci_read_config_word
int pci_can_probe(struct pci_device *pci)
Check if PCI bus probing is allowed.
typeof() pci_write_config_byte * pci_write_config_byte
typeof() pci_read_config_dword * pci_read_config_dword
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
static __always_inline void unsigned long bus_addr
Cloud VM PCI configuration space access.
uint16_t busdevfn
PCI bus:dev.fn address.
typeof() pci_can_probe * pci_can_probe
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int pci_read_config_dword(struct pci_device *pci, unsigned int where, uint32_t *value)
Read 32-bit dword from PCI configuration space.
pseudo_bit_t value[0x00020]
typeof() pci_write_config_word * pci_write_config_word
A PCI bus:dev.fn address range.
int pci_write_config_byte(struct pci_device *pci, unsigned int where, uint8_t value)
Write byte to PCI configuration space.
A runtime selectable PCI I/O API.
typeof() pci_read_config_byte * pci_read_config_byte
typeof() pci_ioremap * pci_ioremap
unsigned int count
Number of bus:dev.fn addresses within this range.
void pci_discover(uint32_t busdevfn, struct pci_range *range)
Find next PCI bus:dev.fn address range in system.
PCI I/O API for Enhanced Configuration Access Mechanism (ECAM)
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
static __always_inline int unsigned int where
typeof(acpi_finder=acpi_find)
ACPI table finder.
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
typeof() pci_write_config_dword * pci_write_config_dword
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.