pci_io.h File Reference

PCI I/O API. More...

#include <stdint.h>
#include <gpxe/api.h>
#include <config/ioapi.h>
#include <gpxe/efi/efi_pci.h>
#include <bits/pci_io.h>

Go to the source code of this file.

Defines

#define PCIAPI_INLINE(_subsys, _api_func)   SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )
 Calculate static inline PCI I/O API function name.
#define PROVIDE_PCIAPI(_subsys, _api_func, _func)   PROVIDE_SINGLE_API ( PCIAPI_PREFIX_ ## _subsys, _api_func, _func )
 Provide a PCI I/O API implementation.
#define PROVIDE_PCIAPI_INLINE(_subsys, _api_func)   PROVIDE_SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )
 Provide a static inline PCI I/O API implementation.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
int pci_max_bus (void)
 Determine maximum PCI bus number within system.
int pci_read_config_byte (struct pci_device *pci, unsigned int where, uint8_t *value)
 Read byte from 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.
int pci_read_config_dword (struct pci_device *pci, unsigned int where, uint32_t *value)
 Read 32-bit dword from PCI configuration space.
int pci_write_config_byte (struct pci_device *pci, unsigned int where, uint8_t value)
 Write byte to PCI configuration space.
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_write_config_dword (struct pci_device *pci, unsigned int where, uint32_t value)
 Write 32-bit dword to PCI configuration space.


Detailed Description

PCI I/O API.

Definition in file pci_io.h.


Define Documentation

#define PCIAPI_INLINE ( _subsys,
_api_func   )     SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )

Calculate static inline PCI I/O API function name.

Parameters:
_prefix Subsystem prefix
_api_func API function
Return values:
_subsys_func Subsystem API function

Definition at line 23 of file pci_io.h.

#define PROVIDE_PCIAPI ( _subsys,
_api_func,
_func   )     PROVIDE_SINGLE_API ( PCIAPI_PREFIX_ ## _subsys, _api_func, _func )

Provide a PCI I/O API implementation.

Parameters:
_prefix Subsystem prefix
_api_func API function
_func Implementing function

Definition at line 33 of file pci_io.h.

#define PROVIDE_PCIAPI_INLINE ( _subsys,
_api_func   )     PROVIDE_SINGLE_API_INLINE ( PCIAPI_PREFIX_ ## _subsys, _api_func )

Provide a static inline PCI I/O API implementation.

Parameters:
_prefix Subsystem prefix
_api_func API function

Definition at line 42 of file pci_io.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

int pci_max_bus ( void   ) 

Determine maximum PCI bus number within system.

Return values:
max_bus Maximum bus number

Referenced by pcibus_probe().

int pci_read_config_byte ( struct pci_device pci,
unsigned int  where,
uint8_t value 
)

Read byte from PCI configuration space.

Parameters:
pci PCI device
where Location within PCI configuration space
value Value read
Return values:
rc Return status code

Referenced by adjust_pci_device(), ath5k_probe(), atl1e_sw_init(), e1000_sw_init(), falcon_probe_nic_variant(), igb_sw_init(), pci_find_capability(), pcibus_probe(), rhine_probe1(), sis190_get_mac_addr(), sis190_get_mac_addr_from_apc(), sis630e_get_mac_addr(), sis900_probe(), sundance_probe(), tg3_get_invariants(), tulip_probe(), velocity_get_pci_info(), and vxge_probe().

int pci_read_config_word ( struct pci_device pci,
unsigned int  where,
uint16_t value 
)

int pci_read_config_dword ( struct pci_device pci,
unsigned int  where,
uint32_t value 
)

Read 32-bit dword from PCI configuration space.

Parameters:
pci PCI device
where Location within PCI configuration space
value Value read
Return values:
rc Return status code

Referenced by dmfe_probe(), mac_address_from_string_specs(), mtnic_init_pci(), pci_backup(), pci_bar(), pci_bar_size(), pci_resource_flags(), pci_save_state(), pcibus_probe(), phantom_probe(), prism2_find_plx(), skge_reset(), ssb_pci_setup(), tg3_chip_reset(), tg3_get_invariants(), and tg3_read_mem().

int pci_write_config_byte ( struct pci_device pci,
unsigned int  where,
uint8_t  value 
)

Write byte to PCI configuration space.

Parameters:
pci PCI device
where Location within PCI configuration space
value Value to be written
Return values:
rc Return status code

Referenced by adjust_pci_device(), ath5k_probe(), mac_address_from_string_specs(), rhine_probe1(), rtl8169_init_phy(), rtl_hw_start_8169(), sis190_get_mac_addr_from_apc(), sis630e_get_mac_addr(), and tg3_get_invariants().

int pci_write_config_word ( struct pci_device pci,
unsigned int  where,
uint16_t  value 
)

int pci_write_config_dword ( struct pci_device pci,
unsigned int  where,
uint32_t  value 
)

Write 32-bit dword to PCI configuration space.

Parameters:
pci PCI device
where Location within PCI configuration space
value Value to be written
Return values:
rc Return status code

Referenced by atl1e_setup_pcicmd(), bnx2_init_board(), davicom_probe(), mac_address_from_string_specs(), pci_bar_size(), pci_resource_flags(), pci_restore(), pci_restore_state(), phantom_probe(), restore_config(), sis900_probe(), skge_reset(), ssb_pci_setup(), tg3_chip_reset(), tg3_get_invariants(), tg3_read_mem(), tg3_set_power_state_0(), tg3_write_indirect_reg32(), tg3_write_mem(), and tulip_probe().


Generated on Tue Apr 6 20:01:52 2010 for gPXE by  doxygen 1.5.7.1