Author: stepan
Date: 2010-01-17 14:54:08 +0100 (Sun, 17 Jan 2010)
New Revision: 5030

Modified:
   trunk/src/devices/pciexp_device.c
Log:
Initial PCIe tuning: Enable Active State Power Management (ASPM)

Signed-off-by: Stefan Reinauer <[email protected]>
Acked-by: Ronald G. Minnich <[email protected]>
Acked-by: Peter Stuge <[email protected]>



Modified: trunk/src/devices/pciexp_device.c
===================================================================
--- trunk/src/devices/pciexp_device.c   2010-01-17 13:52:50 UTC (rev 5029)
+++ trunk/src/devices/pciexp_device.c   2010-01-17 13:54:08 UTC (rev 5030)
@@ -34,8 +34,16 @@
                /* error... */
                return;
        }
-       // printk_debug("PCIe: tuning %s\n", dev_path(dev));
-       /* TODO: Implement PCI Express tuning. */
+#ifdef CONFIG_PCIE_TUNING
+       printk_debug("PCIe: tuning %s\n", dev_path(dev));
+
+       // TODO make this depending on ASPM
+       /* Enable ASPM Role Based Error Reporting */
+       u32 reg32;
+       reg32 = pci_read_config32(dev, cap + PCI_EXP_DEVCAP);
+       reg32 |= PCI_EXP_DEVCAP_RBER;
+       pci_write_config32(dev, cap + PCI_EXP_DEVCAP, reg32);
+#endif
 }
 
 unsigned int pciexp_scan_bus(struct bus *bus, 


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to