pcidev: reduce amount of global variables
Follows upstream's rework of PCI initialization
BUG=chromium:478356
BRANCH=none
TEST=still builds
Change-Id: Iaea0079df5482f6d29832def68adee6116350913
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/463389
Commit-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Martin Roth <martinroth@chromium.org>
diff --git a/programmer.h b/programmer.h
index fab8b0e..09a14ef 100644
--- a/programmer.h
+++ b/programmer.h
@@ -237,7 +237,6 @@
#if NEED_PCI == 1
/* pcidev.c */
-extern uint32_t io_base_addr;
extern struct pci_access *pacc;
extern struct pci_dev *pcidev_dev;
struct dev_entry {
@@ -249,7 +248,7 @@
};
uintptr_t pcidev_readbar(struct pci_dev *dev, int bar);
uintptr_t pcidev_validate(struct pci_dev *dev, int bar, const struct dev_entry *devs);
-uintptr_t pcidev_init(const struct dev_entry *devs, int bar);
+struct pci_dev *pcidev_init(const struct dev_entry *devs, int bar);
/* rpci_write_* are reversible writes. The original PCI config space register
* contents will be restored on shutdown.
*/