RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
access.h File Reference

PCI Access Methods. More...

#include <stdint.h>
#include <libcpu/byteorder.h>
#include <rtems/score/basedefs.h>
#include <pci.h>

Go to the source code of this file.

Data Structures

struct  pci_cfg_ops
 
struct  pci_io_ops
 
struct  pci_memreg_ops
 
struct  pci_access_drv
 

Macros

#define PCI_DEV(bus, slot, func)   (((bus)<<8) | ((slot)<<3) | (func))
 
#define PCI_DEV_BUS(dev)   (((dev) >> 8) & 0xff)
 
#define PCI_DEV_SLOT(dev)   (((dev) >> 3) & 0x1f)
 
#define PCI_DEV_FUNC(dev)   ((dev) & 0x7)
 
#define PCI_DEV_DEVFUNC(dev)   ((dev) & 0xff)
 
#define PCI_DEV_EXPAND(dev)   PCI_DEV_BUS((dev)), PCI_DEV_SLOT((dev)), PCI_DEV_FUNC((dev))
 

Typedefs

typedef uint16_t pci_dev_t
 
typedef uint8_t(* pci_ld8_t) (uint8_t *adr)
 
typedef void(* pci_st8_t) (uint8_t *adr, uint8_t data)
 
typedef uint16_t() pci_ld16_t(uint16_t *adr)
 
typedef void(* pci_st16_t) (uint16_t *adr, uint16_t data)
 
typedef uint32_t(* pci_ld32_t) (uint32_t *adr)
 
typedef void(* pci_st32_t) (uint32_t *adr, uint32_t data)
 

Functions

int pci_access_drv_register (struct pci_access_drv *drv)
 
void pci_modify_cmdsts (pci_dev_t dev, uint32_t mask, uint32_t val)
 
int pci_cfg_r8 (pci_dev_t dev, int ofs, uint8_t *data)
 
int pci_cfg_r16 (pci_dev_t dev, int ofs, uint16_t *data)
 
int pci_cfg_r32 (pci_dev_t dev, int ofs, uint32_t *data)
 
int pci_cfg_w8 (pci_dev_t dev, int ofs, uint8_t data)
 
int pci_cfg_w16 (pci_dev_t dev, int ofs, uint16_t data)
 
int pci_cfg_w32 (pci_dev_t dev, int ofs, uint32_t data)
 
uint8_t pci_io_r8 (uint32_t adr)
 
uint16_t pci_io_r16 (uint32_t adr)
 
uint32_t pci_io_r32 (uint32_t adr)
 
void pci_io_w8 (uint32_t adr, uint8_t data)
 
void pci_io_w16 (uint32_t adr, uint16_t data)
 
void pci_io_w32 (uint32_t adr, uint32_t data)
 
uint8_t pci_mem_ld8 (uint8_t *adr)
 
void pci_mem_st8 (uint8_t *adr, uint8_t data)
 
uint16_t pci_mem_be_ld_le16 (uint16_t *adr)
 
uint16_t pci_mem_be_ld_be16 (uint16_t *adr)
 
uint32_t pci_mem_be_ld_le32 (uint32_t *adr)
 
uint32_t pci_mem_be_ld_be32 (uint32_t *adr)
 
void pci_mem_be_st_le16 (uint16_t *adr, uint16_t data)
 
void pci_mem_be_st_be16 (uint16_t *adr, uint16_t data)
 
void pci_mem_be_st_le32 (uint32_t *adr, uint32_t data)
 
void pci_mem_be_st_be32 (uint32_t *adr, uint32_t data)
 
uint16_t pci_mem_le_ld_le16 (uint16_t *adr)
 
uint16_t pci_mem_le_ld_be16 (uint16_t *adr)
 
uint32_t pci_mem_le_ld_le32 (uint32_t *adr)
 
uint32_t pci_mem_le_ld_be32 (uint32_t *adr)
 
void pci_mem_le_st_le16 (uint16_t *adr, uint16_t data)
 
void pci_mem_le_st_be16 (uint16_t *adr, uint16_t data)
 
void pci_mem_le_st_le32 (uint32_t *adr, uint32_t data)
 
void pci_mem_le_st_be32 (uint32_t *adr, uint32_t data)
 
int pci_access_func (int wr, int size, void **func, int endian, int type)
 

Variables

struct pci_access_drv pci_access_ops
 
struct pci_memreg_ops pci_mem_le_ops
 
struct pci_memreg_ops pci_mem_be_ops
 

Detailed Description

PCI Access Methods.

Routines to access PCI memory/configuration space and other PCI related functions the PCI Library provides.