Add proper workaround for 3COM 3C90xB cards, which need special fixups (the 3C90xC ones don't)

This is tested on hardware.

Also, add initial support for the Atmel AT29C010A chip (which I inserted
in a 3COM 3C90xB card for testing). It can be detected, read works,
erase works, but write will need some additional code (will post in
another patch later).

Corresponding to flashrom svn r520.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
diff --git a/pcidev.c b/pcidev.c
index f07fe80..41b5f25 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -32,6 +32,7 @@
 struct pci_access *pacc;
 struct pci_filter filter;
 char *pcidev_bdf = NULL;
+struct pci_dev *pcidev_dev = NULL;
 
 uint32_t pcidev_validate(struct pci_dev *dev, struct pcidev_status *devs)
 {
@@ -67,7 +68,7 @@
 	struct pci_dev *dev;
 	char *msg = NULL;
 	int found = 0;
-	uint32_t addr = 0;
+	uint32_t addr = 0, curaddr = 0;
 
 	pacc = pci_alloc();     /* Get the pci_access structure */
 	pci_init(pacc);         /* Initialize the PCI library */
@@ -85,8 +86,11 @@
 
 	for (dev = pacc->devices; dev; dev = dev->next) {
 		if (pci_filter_match(&filter, dev)) {
-			if ((addr = pcidev_validate(dev, devs)) != 0)
+			if ((addr = pcidev_validate(dev, devs)) != 0) {
+				curaddr = addr;
+				pcidev_dev = dev;
 				found++;
+			}
 		}
 	}
 
@@ -102,7 +106,7 @@
 		exit(1);
 	}
 
-	return addr;
+	return curaddr;
 }
 
 void print_supported_pcidevs(struct pcidev_status *devs)