Changeset a31845f7 in rtems for cpukit/sapi


Ignore:
Timestamp:
Nov 28, 2011, 9:11:10 AM (8 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
02550220
Parents:
e51eb80
git-author:
Daniel Hellstrom <daniel@…> (11/28/11 09:11:10)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:15)
Message:

LIBPCI: added PCI layer to cpukit/libpci

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    re51eb80 ra31845f7  
    34813481#endif
    34823482
     3483/*
     3484 *  Select PCI Configuration Library
     3485 */
     3486#ifdef RTEMS_PCI_CONFIG_LIB
     3487  #ifdef CONFIGURE_INIT
     3488    #define PCI_LIB_NONE 0
     3489    #define PCI_LIB_AUTO 1
     3490    #define PCI_LIB_STATIC 2
     3491    #define PCI_LIB_READ 3
     3492    #define PCI_LIB_PERIPHERAL 4
     3493    #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO
     3494      #define PCI_CFG_AUTO_LIB
     3495      #include <pci/cfg.h>
     3496      struct pci_bus pci_hb;
     3497      #define PCI_LIB_INIT pci_config_auto
     3498      #define PCI_LIB_CONFIG pci_config_auto_register
     3499    #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC
     3500      #define PCI_CFG_STATIC_LIB
     3501      #include <pci/cfg.h>
     3502      #define PCI_LIB_INIT pci_config_static
     3503      #define PCI_LIB_CONFIG NULL
     3504      /* Let user define PCI configuration (struct pci_bus pci_hb) */
     3505    #elif CONFIGURE_PCI_LIB == PCI_LIB_READ
     3506      #define PCI_CFG_READ_LIB
     3507      #include <pci/cfg.h>
     3508      #define PCI_LIB_INIT pci_config_read
     3509      #define PCI_LIB_CONFIG NULL
     3510      struct pci_bus pci_hb;
     3511    #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL
     3512      #define PCI_LIB_INIT pci_config_peripheral
     3513      #define PCI_LIB_CONFIG NULL
     3514      /* Let user define PCI configuration (struct pci_bus pci_hb) */
     3515    #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE
     3516      #define PCI_LIB_INIT NULL
     3517      #define PCI_LIB_CONFIG NULL
     3518      /* No PCI Configuration at all, user can use/debug access routines */
     3519    #else
     3520      #error NO PCI LIBRARY DEFINED
     3521    #endif
     3522
     3523    const int pci_config_lib_type = CONFIGURE_PCI_LIB;
     3524    int (*pci_config_lib_init)(void) = PCI_LIB_INIT;
     3525    void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG;
     3526  #endif
     3527#endif
     3528
    34833529#ifdef __cplusplus
    34843530}
Note: See TracChangeset for help on using the changeset viewer.