diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-08 10:51:45 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:28 +0200 |
commit | f4bf22c8e5093fa65b0c95467c918a2812daef66 (patch) | |
tree | 30f567c90c5bf2cc85e7382a5410a934907dd10d /cpukit/libpci/pci_cfg_auto.c | |
parent | LIBPCI: various comment/unsed clean-ups (diff) | |
download | rtems-f4bf22c8e5093fa65b0c95467c918a2812daef66.tar.bz2 |
LIBPCI: new implementation private header file
- new implementation private header file
- moved double implementation of pci_dev_create used by read & auto cfg
libraries to common pci_dev_create.c
- moved declaration of pci_bus_cnt to private header file so avoid extern
in .c files
Diffstat (limited to 'cpukit/libpci/pci_cfg_auto.c')
-rw-r--r-- | cpukit/libpci/pci_cfg_auto.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/cpukit/libpci/pci_cfg_auto.c b/cpukit/libpci/pci_cfg_auto.c index b23c0bce3d..d591977ab0 100644 --- a/cpukit/libpci/pci_cfg_auto.c +++ b/cpukit/libpci/pci_cfg_auto.c @@ -19,6 +19,8 @@ #include <pci/access.h> #include <pci/cfg.h> +#include "pci_internal.h" + /* #define DEBUG */ #ifdef DEBUG @@ -38,9 +40,6 @@ #define PCI_CFG_W16(dev, args...) pci_cfg_w16(dev, args) #define PCI_CFG_W32(dev, args...) pci_cfg_w32(dev, args) -/* Number of PCI buses */ -extern int pci_bus_cnt; - int pci_config_auto_initialized = 0; /* Configuration setup */ @@ -268,23 +267,6 @@ static void pci_dev_free(struct pci_dev *dev) } #endif -static struct pci_dev *pci_dev_create(int isbus) -{ - void *ptr; - int size; - - if (isbus) - size = sizeof(struct pci_bus); - else - size = sizeof(struct pci_dev); - - ptr = malloc(size); - if (!ptr) - rtems_fatal_error_occurred(RTEMS_NO_MEMORY); - memset(ptr, 0, size); - return ptr; -} - static void pci_find_devs(struct pci_bus *bus) { uint32_t id, tmp; |