10 #define PCIAPI_PREFIX_direct 12 #define PCIAPI_PREFIX_direct __direct_ 21 #define PCIDIRECT_CONFIG_ADDRESS 0xcf8 22 #define PCIDIRECT_CONFIG_DATA 0xcfc struct pci_api pcidirect_api
uint32_t start
Starting bus:dev.fn address.
outw(value, PCIDIRECT_CONFIG_DATA+(where &2))
uint16_t inw(volatile uint16_t *io_addr)
Read 16-bit word from I/O-mapped device.
outl(value, PCIDIRECT_CONFIG_DATA)
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.
static __always_inline int PCIAPI_INLINE(direct, 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
#define PCIDIRECT_CONFIG_DATA
void pcidirect_prepare(struct pci_device *pci, int where)
Prepare for Type 1 PCI configuration space access.
uint16_t busdevfn
PCI bus:dev.fn address.
outb(value, PCIDIRECT_CONFIG_DATA+(where &3))
int pci_read_config_dword(struct pci_device *pci, unsigned int where, uint32_t *value)
Read 32-bit dword from PCI configuration space.
#define __unused
Declare a variable or data structure as unused.
A PCI bus:dev.fn address range.
static __always_inline void struct pci_range * range
#define PCI_BUSDEVFN(segment, bus, slot, func)
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.
#define __always_inline
Declare a function to be always inline.
static __always_inline void unsigned long size_t len
uint8_t inb(volatile uint8_t *io_addr)
Read byte from I/O-mapped device.
static __always_inline int unsigned int where
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.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t inl(volatile uint32_t *io_addr)
Read 32-bit dword from I/O-mapped device.
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
void * ioremap(unsigned long bus_addr, size_t len)
Map bus address as an I/O address.
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
static __always_inline int unsigned int uint8_t * value
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.