Author: mcayland Date: Mon Mar 3 00:18:34 2014 New Revision: 1270 URL: http://tracker.coreboot.org/trac/openbios/changeset/1270
Log: pci: Add the prog interface field to class-code property
The class-code property of PCI devices should also include the prog interface field. This patch adds this.
Signed-off-by: BALATON Zoltan balaton@eik.bme.hu Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/drivers/pci.c
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Sun Feb 16 17:26:46 2014 (r1269) +++ trunk/openbios-devel/drivers/pci.c Mon Mar 3 00:18:34 2014 (r1270) @@ -893,11 +893,13 @@ int status,id; uint16_t vendor_id, device_id; uint8_t rev; + uint8_t class_prog; uint32_t class_code;
vendor_id = pci_config_read16(addr, PCI_VENDOR_ID); device_id = pci_config_read16(addr, PCI_DEVICE_ID); rev = pci_config_read8(addr, PCI_REVISION_ID); + class_prog = pci_config_read8(addr, PCI_CLASS_PROG); class_code = pci_config_read16(addr, PCI_CLASS_DEVICE);
if (pci_dev) { @@ -925,7 +927,7 @@ set_int_property(dev, "vendor-id", vendor_id); set_int_property(dev, "device-id", device_id); set_int_property(dev, "revision-id", rev); - set_int_property(dev, "class-code", class_code << 8); + set_int_property(dev, "class-code", class_code << 8 | class_prog);
if (config->irq_pin) { OLDWORLD(set_int_property(dev, "AAPL,interrupts",