From af358d6af23b21f93f6e27278e76eec21a3d148f Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Thu, 27 Dec 2012 18:40:26 +0000 Subject: Refactor PCI and USB device status printing To be able to get rid of lots of #ifdefs and centralize programmer-specific data more... - introduce two new fields to struct programmer_entry, namely enum type (OTHER, USB, PCI) and union devs (pcidev_status, usbdev_status or char *note). - use those fields to generate device listings in print.c and print_wiki.c. Bonus: add printing of USB devices to print_wiki.c and count supported PCI and USB devices. Corresponding to flashrom svn r1631. Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger --- pcidev.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'pcidev.c') diff --git a/pcidev.c b/pcidev.c index c1b6d6a..bfc8a5d 100644 --- a/pcidev.c +++ b/pcidev.c @@ -224,19 +224,6 @@ uintptr_t pcidev_init(int bar, const struct pcidev_status *devs) return curaddr; } -void print_supported_pcidevs(const struct pcidev_status *devs) -{ - int i; - - msg_pinfo("PCI devices:\n"); - for (i = 0; devs[i].vendor_name != NULL; i++) { - msg_pinfo("%s %s [%04x:%04x]%s\n", devs[i].vendor_name, - devs[i].device_name, devs[i].vendor_id, - devs[i].device_id, - (devs[i].status == NT) ? " (untested)" : ""); - } -} - enum pci_write_type { pci_write_type_byte, pci_write_type_word, -- cgit v1.1