summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-14 17:20:36 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-25 07:18:36 +0100
commit55a731615980a54d9020ee8b0b9b6ba29ab89fe6 (patch)
tree82a2caf4baeb036656be04cfd3c7b7380c6f1a07 /cpukit
parentconfig: Add <rtems/confdefs/obsolete.h> (diff)
downloadrtems-55a731615980a54d9020ee8b0b9b6ba29ab89fe6.tar.bz2
config: Add <rtems/confdefs/libpci.h>
Derive copyright and license for new file form the file history. Update #3875.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/headers.am1
-rw-r--r--cpukit/include/rtems/confdefs.h47
-rw-r--r--cpukit/include/rtems/confdefs/libpci.h70
3 files changed, 72 insertions, 46 deletions
diff --git a/cpukit/headers.am b/cpukit/headers.am
index f0c8319dcb..658444cf9e 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -183,6 +183,7 @@ include_rtems_HEADERS += include/rtems/userenv.h
include_rtems_HEADERS += include/rtems/version.h
include_rtems_HEADERS += include/rtems/vmeintr.h
include_rtems_HEADERS += include/rtems/watchdogdrv.h
+include_rtems_confdefs_HEADERS += include/rtems/confdefs/libpci.h
include_rtems_confdefs_HEADERS += include/rtems/confdefs/obsolete.h
include_rtems_debugger_HEADERS += include/rtems/debugger/rtems-debugger-bsp.h
include_rtems_debugger_HEADERS += include/rtems/debugger/rtems-debugger-remote.h
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index 1fecfdcbb6..b2a10902e4 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -51,6 +51,7 @@
#include <rtems/posix/shm.h>
#include <rtems/posix/timer.h>
#include <rtems/confdefs/obsolete.h>
+#include <rtems/confdefs/libpci.h>
#include <limits.h>
@@ -2658,52 +2659,6 @@ struct _reent *__getreent(void)
#endif
#endif
-/*
- * Select PCI Configuration Library
- */
-#ifdef RTEMS_PCI_CONFIG_LIB
- #ifdef CONFIGURE_INIT
- #define PCI_LIB_NONE 0
- #define PCI_LIB_AUTO 1
- #define PCI_LIB_STATIC 2
- #define PCI_LIB_READ 3
- #define PCI_LIB_PERIPHERAL 4
- #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO
- #define PCI_CFG_AUTO_LIB
- #include <pci/cfg.h>
- struct pci_bus pci_hb;
- #define PCI_LIB_INIT pci_config_auto
- #define PCI_LIB_CONFIG pci_config_auto_register
- #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC
- #define PCI_CFG_STATIC_LIB
- #include <pci/cfg.h>
- #define PCI_LIB_INIT pci_config_static
- #define PCI_LIB_CONFIG NULL
- /* Let user define PCI configuration (struct pci_bus pci_hb) */
- #elif CONFIGURE_PCI_LIB == PCI_LIB_READ
- #define PCI_CFG_READ_LIB
- #include <pci/cfg.h>
- #define PCI_LIB_INIT pci_config_read
- #define PCI_LIB_CONFIG NULL
- struct pci_bus pci_hb;
- #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL
- #define PCI_LIB_INIT pci_config_peripheral
- #define PCI_LIB_CONFIG NULL
- /* Let user define PCI configuration (struct pci_bus pci_hb) */
- #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE
- #define PCI_LIB_INIT NULL
- #define PCI_LIB_CONFIG NULL
- /* No PCI Configuration at all, user can use/debug access routines */
- #else
- #error NO PCI LIBRARY DEFINED
- #endif
-
- const int pci_config_lib_type = CONFIGURE_PCI_LIB;
- int (*pci_config_lib_init)(void) = PCI_LIB_INIT;
- void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG;
- #endif
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/include/rtems/confdefs/libpci.h b/cpukit/include/rtems/confdefs/libpci.h
new file mode 100644
index 0000000000..a68eea1903
--- /dev/null
+++ b/cpukit/include/rtems/confdefs/libpci.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2011 Cobham Gaisler AB
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSApplicationConfiguration
+ *
+ * @brief This header file evaluates PCI library configuration options.
+ */
+
+#ifndef _RTEMS_CONFDEFS_LIBPCI_H
+#define _RTEMS_CONFDEFS_LIBPCI_H
+
+#ifndef __CONFIGURATION_TEMPLATE_h
+#error "Do not include this file directly, use <rtems/confdefs.h> instead"
+#endif
+
+/*
+ * Select PCI Configuration Library
+ */
+#ifdef RTEMS_PCI_CONFIG_LIB
+ #ifdef CONFIGURE_INIT
+ #define PCI_LIB_NONE 0
+ #define PCI_LIB_AUTO 1
+ #define PCI_LIB_STATIC 2
+ #define PCI_LIB_READ 3
+ #define PCI_LIB_PERIPHERAL 4
+ #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO
+ #define PCI_CFG_AUTO_LIB
+ #include <pci/cfg.h>
+ struct pci_bus pci_hb;
+ #define PCI_LIB_INIT pci_config_auto
+ #define PCI_LIB_CONFIG pci_config_auto_register
+ #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC
+ #define PCI_CFG_STATIC_LIB
+ #include <pci/cfg.h>
+ #define PCI_LIB_INIT pci_config_static
+ #define PCI_LIB_CONFIG NULL
+ /* Let user define PCI configuration (struct pci_bus pci_hb) */
+ #elif CONFIGURE_PCI_LIB == PCI_LIB_READ
+ #define PCI_CFG_READ_LIB
+ #include <pci/cfg.h>
+ #define PCI_LIB_INIT pci_config_read
+ #define PCI_LIB_CONFIG NULL
+ struct pci_bus pci_hb;
+ #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL
+ #define PCI_LIB_INIT pci_config_peripheral
+ #define PCI_LIB_CONFIG NULL
+ /* Let user define PCI configuration (struct pci_bus pci_hb) */
+ #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE
+ #define PCI_LIB_INIT NULL
+ #define PCI_LIB_CONFIG NULL
+ /* No PCI Configuration at all, user can use/debug access routines */
+ #else
+ #error NO PCI LIBRARY DEFINED
+ #endif
+
+ const int pci_config_lib_type = CONFIGURE_PCI_LIB;
+ int (*pci_config_lib_init)(void) = PCI_LIB_INIT;
+ void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG;
+ #endif
+#endif
+
+#endif /* _RTEMS_CONFDEFS_LIBPCI_H */