1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

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>
This commit is contained in:
Uwe Hermann
2009-05-16 21:39:19 +00:00
parent 5820f42ef2
commit 8403ccb49f
4 changed files with 49 additions and 4 deletions

View File

@ -32,6 +32,7 @@ uint32_t io_base_addr;
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 @@ uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs)
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 @@ uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs)
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 @@ uint32_t pcidev_init(uint16_t vendor_id, struct pcidev_status *devs)
exit(1);
}
return addr;
return curaddr;
}
void print_supported_pcidevs(struct pcidev_status *devs)