summaryrefslogtreecommitdiffstats
path: root/cpukit/libpci/pci_cfg_peripheral.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libpci/pci_cfg_peripheral.c')
-rw-r--r--cpukit/libpci/pci_cfg_peripheral.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/cpukit/libpci/pci_cfg_peripheral.c b/cpukit/libpci/pci_cfg_peripheral.c
new file mode 100644
index 0000000000..d1ba4c93a6
--- /dev/null
+++ b/cpukit/libpci/pci_cfg_peripheral.c
@@ -0,0 +1,32 @@
+/* PCI (Peripheral) Configuration Library
+ *
+ * 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.com/license/LICENSE.
+ */
+
+/*
+ *
+ * The Host Bridge bus must be declared by user. It contain the static
+ * configuration used to setup the devices/functions.
+ */
+
+/* Configure headers */
+#define PCI_CFG_PERIPHERAL_LIB
+
+#include <pci/cfg.h>
+
+/* Number of buses */
+extern int pci_bus_cnt;
+
+/* Assume that user has defined static setup array in pci_hb */
+int pci_config_peripheral(void)
+{
+ pci_bus_cnt = pci_hb.sord + 1;
+ pci_system_type = PCI_SYSTEM_PERIPHERAL;
+
+ return 0;
+}