28 #define PCI_BUSDEVFN( segment, bus, slot, func ) \ 29 ( ( (segment) << 16 ) | ( (bus) << 8 ) | \ 30 ( (slot) << 3 ) | ( (func) << 0 ) ) 39 #define PCIAPI_INLINE( _subsys, _api_func ) \ 40 SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func ) 49 #define PROVIDE_PCIAPI( _subsys, _api_func, _func ) \ 50 PROVIDE_SINGLE_API ( PCIAPI_PREFIX_ ## _subsys, _api_func, _func ) 58 #define PROVIDE_PCIAPI_INLINE( _subsys, _api_func ) \ 59 PROVIDE_SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func ) 68 #include <bits/pci_io.h> 175 #define PCIAPI_RUNTIME( _subsys ) { \ 177 .pci_discover = PCIAPI_INLINE ( _subsys, pci_discover ), \ 178 .pci_read_config_byte = \ 179 PCIAPI_INLINE ( _subsys, pci_read_config_byte ), \ 180 .pci_read_config_word = \ 181 PCIAPI_INLINE ( _subsys, pci_read_config_word ), \ 182 .pci_read_config_dword = \ 183 PCIAPI_INLINE ( _subsys, pci_read_config_dword ), \ 184 .pci_write_config_byte = \ 185 PCIAPI_INLINE ( _subsys, pci_write_config_byte ), \ 186 .pci_write_config_word = \ 187 PCIAPI_INLINE ( _subsys, pci_write_config_word ), \ 188 .pci_write_config_dword = \ 189 PCIAPI_INLINE ( _subsys, pci_write_config_dword ), \ 190 .pci_ioremap = PCIAPI_INLINE ( _subsys, pci_ioremap ), \
uint32_t start
Starting bus:dev.fn address.
typeof() pci_discover * pci_discover
typeof() pci_read_config_word * pci_read_config_word
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_can_probe(void)
Check if PCI bus probing is allowed.
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
uint16_t busdevfn
PCI bus:dev.fn address.
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.
static __always_inline void struct pci_range * 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.