|
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
|
int | ecam_read (struct pci_device *pci, unsigned int location, void *value) |
| Read from PCI configuration space. More...
|
|
int | ecam_write (struct pci_device *pci, unsigned int location, unsigned long value) |
| Write to PCI configuration space. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_read_config_byte)(struct pci_device *pci |
| Read byte from PCI configuration space via ECAM. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_read_config_word)(struct pci_device *pci |
| Read word from PCI configuration space via ECAM. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_read_config_dword)(struct pci_device *pci |
| Read dword from PCI configuration space via ECAM. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_write_config_byte)(struct pci_device *pci |
| Write byte to PCI configuration space via ECAM. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_write_config_word)(struct pci_device *pci |
| Write word to PCI configuration space via ECAM. More...
|
|
static __always_inline int | PCIAPI_INLINE (ecam, pci_write_config_dword)(struct pci_device *pci |
| Write dword to PCI configuration space via ECAM. More...
|
|
static __always_inline void * | PCIAPI_INLINE (ecam, pci_ioremap)(struct pci_device *pci __unused |
| Map PCI bus address as an I/O address. More...
|
|
PCI I/O API for Enhanced Configuration Access Mechanism (ECAM)
Definition in file ecam_io.h.
int ecam_read |
( |
struct pci_device * |
pci, |
|
|
unsigned int |
location, |
|
|
void * |
value |
|
) |
| |
Read from PCI configuration space.
- Parameters
-
pci | PCI device |
location | Offset and length within PCI configuration space |
value | Value read |
- Return values
-
Definition at line 196 of file ecam.c.
static int ecam_access(struct pci_device *pci)
Access configuration space for PCI device.
uint32_t start
Starting bus:dev.fn address.
struct arbelprm_rc_send_wqe rc
uint8_t readb(volatile uint8_t *io_addr)
Read byte from memory-mapped device.
struct pci_range range
PCI bus:dev.fn address range.
uint16_t readw(volatile uint16_t *io_addr)
Read 16-bit word from memory-mapped device.
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
static struct ecam_mapping ecam
Cached mapped ECAM allocation.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
pseudo_bit_t value[0x00020]
void * regs
MMIO base address.
#define ECAM_LEN(location)
Extract length from ECAM location.
uint32_t busdevfn
Segment, bus, device, and function (bus:dev.fn) number.
#define ECAM_SIZE
Enhanced Configuration Access Mechanism per-device size.
static __always_inline int unsigned int where
#define ECAM_WHERE(location)
Extract offset from ECAM location.
void * memset(void *dest, int character, size_t len) __nonnull
References addr, assert(), pci_device::busdevfn, ecam, ecam_access(), ECAM_LEN, ECAM_SIZE, ECAM_WHERE, index, len, memset(), ecam_mapping::range, rc, readb(), readl(), readw(), ecam_mapping::regs, pci_range::start, value, and where.
Referenced by ecam_write().
int ecam_write |
( |
struct pci_device * |
pci, |
|
|
unsigned int |
location, |
|
|
unsigned long |
value |
|
) |
| |
Write to PCI configuration space.
- Parameters
-
pci | PCI device |
location | Offset and length within PCI configuration space |
value | Value to write |
- Return values
-
Definition at line 238 of file ecam.c.
static int ecam_access(struct pci_device *pci)
Access configuration space for PCI device.
uint32_t start
Starting bus:dev.fn address.
struct arbelprm_rc_send_wqe rc
struct pci_range range
PCI bus:dev.fn address range.
static struct ecam_mapping ecam
Cached mapped ECAM allocation.
void writeb(uint8_t data, volatile uint8_t *io_addr)
Write byte to memory-mapped device.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
pseudo_bit_t value[0x00020]
int ecam_read(struct pci_device *pci, unsigned int location, void *value)
Read from PCI configuration space.
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
void * regs
MMIO base address.
#define ECAM_LEN(location)
Extract length from ECAM location.
uint32_t busdevfn
Segment, bus, device, and function (bus:dev.fn) number.
#define ECAM_SIZE
Enhanced Configuration Access Mechanism per-device size.
static __always_inline int unsigned int where
void mb(void)
Memory barrier.
#define ECAM_WHERE(location)
Extract offset from ECAM location.
References addr, assert(), pci_device::busdevfn, ecam, ecam_access(), ECAM_LEN, ecam_read(), ECAM_SIZE, ECAM_WHERE, index, len, mb(), ecam_mapping::range, rc, ecam_mapping::regs, pci_range::start, value, where, writeb(), writel(), and writew.