nic3com: allow selection of a particular PCI device to use as programmer

Add support for users to specify a certain NIC via PCI bus:slot.func
notation, in case there are multiple NICs in one system.

Usage: flashrom -p nic3com=bb:ss.f

Corresponding to flashrom svn r510.

Signed-off-by: Christian Ruppert <spooky85@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
diff --git a/flash.h b/flash.h
index 0514739..f04e851 100644
--- a/flash.h
+++ b/flash.h
@@ -29,6 +29,7 @@
 #include <unistd.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <pci/pci.h>
 
 /* for iopl and outb under Solaris */
 #if defined (__sun) && (defined(__i386) || defined(__amd64))
@@ -545,6 +546,7 @@
 
 /* PCI handling for board/chipset_enable */
 struct pci_access *pacc;
+struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
 struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
 struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
 			      uint16_t card_vendor, uint16_t card_device);
@@ -623,6 +625,7 @@
 #define printf_debug(x...) { if (verbose) printf(x); }
 void map_flash_registers(struct flashchip *flash);
 int read_memmapped(struct flashchip *flash, uint8_t *buf);
+extern char *nic_pcidev;
 
 /* layout.c */
 int show_id(uint8_t *bios, int size, int force);