[flashrom] [commit] r1004 - trunk

repository service svn at flashrom.org
Sat May 22 01:00:56 CEST 2010


Author: hailfinger
Date: Sat May 22 01:00:56 2010
New Revision: 1004
URL: http://flashrom.org/trac/coreboot/changeset/1004

Log:
libpci < 2.2.4 can not store class info in struct pci_dev.
Read class info manually and store it in a separate variable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>

Modified:
   trunk/board_enable.c

Modified: trunk/board_enable.c
==============================================================================
--- trunk/board_enable.c	Sat May 22 00:28:19 2010	(r1003)
+++ trunk/board_enable.c	Sat May 22 01:00:56 2010	(r1004)
@@ -789,9 +789,11 @@
 
 	/* First, look for a known LPC bridge */
 	for (dev = pacc->devices; dev; dev = dev->next) {
-		pci_fill_info(dev, PCI_FILL_CLASS);
+		uint16_t device_class;
+		/* libpci before version 2.2.4 does not store class info. */
+		device_class = pci_read_word(dev, PCI_CLASS_DEVICE);
 		if ((dev->vendor_id == 0x8086) &&
-		    (dev->device_class == 0x0601)) { /* ISA Bridge */
+		    (device_class == 0x0601)) { /* ISA Bridge */
 			/* Is this device in our list? */
 			for (i = 0; intel_ich_gpio_table[i].id; i++)
 				if (dev->device_id == intel_ich_gpio_table[i].id)




More information about the flashrom mailing list