RTEMS 6.1-rc1
Data Structures | Macros | Enumerations | Functions | Variables
pci_bus.h File Reference

PCI bus driver Interface. More...

#include <drvmgr/drvmgr.h>
#include <pci.h>
#include <pci/access.h>

Go to the source code of this file.

Data Structures

struct  pci_dev_id
 
struct  pci_dev_id_match
 
struct  pcibus_res
 
struct  pci_dev_info
 
struct  pci_drv_info
 
struct  pcibus_regmem_ops
 
struct  pcibus_config
 

Macros

#define DRIVER_PCI_ID(vendor, device)
 
#define DRIVER_PCI_CLASS(class)    DRIVER_ID(DRVMGR_BUS_TYPE_PCI, ((1 << 32) | ((class) & 0xffffff)))
 
#define DRIVER_PCI_GAISLER_RASTAIO_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_RASTA_IO)
 
#define DRIVER_PCI_GAISLER_RASTATMTC_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_RASTA_TMTC)
 
#define DRIVER_PCI_GAISLER_GR701_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_701)
 
#define DRIVER_PCI_GAISLER_RASTAADCDAC_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_RASTA_ADCDAC)
 
#define DRIVER_PCI_GAISLER_TMTC_1553_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_TMTC_1553)
 
#define DRIVER_PCI_GAISLER_RASTA_SPW_ROUTER_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_RASTA_SPW_RTR)
 
#define DRIVER_PCI_GAISLER_LEON4_N2X_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_LEON4_N2X)
 
#define DRIVER_PCI_GAISLER_CPCI_GR740_ID   DRIVER_PCI_ID(PCIID_VENDOR_GAISLER, PCIID_DEVICE_GR_CPCI_GR740)
 
#define PCIID_DEVVEND(vendor, device)    {vendor, device, PCI_ID_ANY, PCI_ID_ANY, 0, 0}
 
#define PCIID_END_TABLE   {0, 0, 0, 0, 0, 0}
 
#define PCIDEV_RES_CNT   (PCIDEV_RES_ROM + 1)
 
#define PCI_FUNC_CFG_R8   DRVMGR_RWFUNC(RW_SIZE_1|RW_READ|RW_CFG)
 
#define PCI_FUNC_CFG_R16   DRVMGR_RWFUNC(RW_SIZE_2|RW_READ|RW_CFG)
 
#define PCI_FUNC_CFG_R32   DRVMGR_RWFUNC(RW_SIZE_4|RW_READ|RW_CFG)
 
#define PCI_FUNC_CFG_W8   DRVMGR_RWFUNC(RW_SIZE_1|RW_WRITE|RW_CFG)
 
#define PCI_FUNC_CFG_W16   DRVMGR_RWFUNC(RW_SIZE_2|RW_WRITE|RW_CFG)
 
#define PCI_FUNC_CFG_W32   DRVMGR_RWFUNC(RW_SIZE_4|RW_WRITE|RW_CFG)
 
#define PCI_FUNC_IO_R8   DRVMGR_RWFUNC(RW_SIZE_1|RW_READ|RW_IO)
 
#define PCI_FUNC_IO_R16   DRVMGR_RWFUNC(RW_SIZE_2|RW_READ|RW_IO)
 
#define PCI_FUNC_IO_R32   DRVMGR_RWFUNC(RW_SIZE_4|RW_READ|RW_IO)
 
#define PCI_FUNC_IO_W8   DRVMGR_RWFUNC(RW_SIZE_1|RW_WRITE|RW_IO)
 
#define PCI_FUNC_IO_W16   DRVMGR_RWFUNC(RW_SIZE_2|RW_WRITE|RW_IO)
 
#define PCI_FUNC_IO_W32   DRVMGR_RWFUNC(RW_SIZE_4|RW_WRITE|RW_IO)
 
#define PCI_FUNC_MREG_R8   DRVMGR_RWFUNC(RW_SIZE_1|RW_READ|RW_MEMREG)
 
#define PCI_FUNC_MREG_R16   DRVMGR_RWFUNC(RW_SIZE_2|RW_READ|RW_MEMREG|RW_LITTLE)
 
#define PCI_FUNC_MREG_R32   DRVMGR_RWFUNC(RW_SIZE_4|RW_READ|RW_MEMREG|RW_LITTLE)
 
#define PCI_FUNC_MREG_W8   DRVMGR_RWFUNC(RW_SIZE_1|RW_WRITE|RW_MEMREG)
 
#define PCI_FUNC_MREG_W16   DRVMGR_RWFUNC(RW_SIZE_2|RW_WRITE|RW_MEMREG|RW_LITTLE)
 
#define PCI_FUNC_MREG_W32   DRVMGR_RWFUNC(RW_SIZE_4|RW_WRITE|RW_MEMREG|RW_LITTLE)
 

Enumerations

enum  {
  PCIDEV_RES_BAR1 = 0 , PCIDEV_RES_BAR2 = 1 , PCIDEV_RES_BAR3 = 2 , PCIDEV_RES_BAR4 = 3 ,
  PCIDEV_RES_BAR5 = 4 , PCIDEV_RES_BAR6 = 5 , PCIDEV_RES_ROM = 6
}
 

Functions

int pcibus_register (struct drvmgr_dev *dev, struct pcibus_config *cfg)
 

Variables

struct drvmgr_bus_res pcibus_drv_resources
 

Detailed Description

PCI bus driver Interface.

Macro Definition Documentation

◆ DRIVER_PCI_ID

#define DRIVER_PCI_ID (   vendor,
  device 
)
Value:
DRIVER_ID(DRVMGR_BUS_TYPE_PCI, \
((((vendor) & 0xffff) << 16) | ((device) & 0xffff)))