13 while ( ttl-- && pos >= 0x40 ) {
16 DBG (
"PCI Capability: %d\n",
id );
#define PCI_HEADER_TYPE_BRIDGE
PCI-to-PCI bridge header.
void pci_restore(struct pci_device *pci, struct pci_config_backup *backup, unsigned int limit, const uint8_t *exclude)
Restore PCI configuration space.
static unsigned int unsigned int reg
#define PCI_CONFIG_BACKUP_STANDARD
Limit of standard PCI configuration space.
#define PCI_CAPABILITY_LIST
PCI capabilities pointer.
int pci_write_config_word(struct pci_device *pci, unsigned int where, uint16_t value)
Write 16-bit word to PCI configuration space.
uint8_t size
Entry size (in 32-bit words)
#define PCI_HEADER_TYPE_MASK
Header type mask.
#define PCI_EXP_FLR_DELAY_MS
PCI Express function level reset delay (in ms)
#define PCI_HEADER_TYPE_CARDBUS
CardBus header.
int pci_read_config_word(struct pci_device *pci, unsigned int where, uint16_t *value)
Read 16-bit word from PCI configuration space.
#define PCI_COMMAND
PCI command.
#define PCI_CAP_NEXT
Next capability.
#define PCI_EXP_DEVCTL_FLR
Function level reset.
#define PCI_HEADER_TYPE
PCI header type.
uint32_t start
Starting offset.
#define PCI_BASE_ADDRESS_IO_MASK
I/O BAR mask.
#define PCI_CB_CAPABILITY_LIST
CardBus capabilities pointer.
#define PCI_HEADER_TYPE_NORMAL
Normal header.
int pci_read_config_dword(struct pci_device *pci, unsigned int where, uint32_t *value)
Read 32-bit dword from PCI configuration space.
uint8_t id
Request identifier.
#define PCI_CAP_ID
Capability ID.
#define PCI_BASE_ADDRESS_MEM_MASK
Memory BAR mask.
A PCI configuration space backup.
#define PCI_STATUS
PCI status.
#define PCI_BASE_ADDRESS_SPACE_IO
I/O BAR.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
void pci_backup(struct pci_device *pci, struct pci_config_backup *backup, unsigned int limit, const uint8_t *exclude)
Back up PCI configuration space.
int pci_write_config_dword(struct pci_device *pci, unsigned int where, uint32_t value)
Write 32-bit dword to PCI configuration space.
#define DBG(...)
Print a debugging message.
#define PCI_STATUS_CAP_LIST
Capabilities list.
#define NULL
NULL pointer (VOID *)
#define PCI_EXP_DEVCTL
PCI Express.
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.
PCI configuration space backup and restoration.