summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2011-09-23 10:33:58 -0700
committerPatrick Georgi <patrick@georgi-clan.de>2012-03-08 18:18:39 +0100
commit0a50084e4d7535c5eb86dc3bf18c357eec4aa69a (patch)
treee30c7cad67e6253816d0cebd9ea8a69309fe0843 /src/devices
parentc8feeddf343e8fd0ddd6be7e42101ab4f1866ed0 (diff)
Don't run VGA option ROMs on S3 resume.
This will save us a few 100 ms on resume. Change-Id: Iabf4c8ab88662ba41236162f0a6f5bd80d8c1255 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/715 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/Kconfig7
-rw-r--r--src/devices/pci_device.c11
2 files changed, 18 insertions, 0 deletions
diff --git a/src/devices/Kconfig b/src/devices/Kconfig
index 9e5ea6e094..572addcf53 100644
--- a/src/devices/Kconfig
+++ b/src/devices/Kconfig
@@ -33,6 +33,13 @@ config VGA_ROM_RUN
Execute VGA option ROMs, if found. This is required to enable
PCI/AGP/PCI-E video cards.
+config S3_VGA_ROM_RUN
+ bool "Re-run VGA option ROMs on S3 resume"
+ default y
+ depends on VGA_ROM_RUN && HAVE_ACPI_RESUME
+ help
+ Execute VGA option ROMs when coming out of an S3 resume.
+
config PCI_ROM_RUN
bool "Run non-VGA option ROMs"
default y
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 2ccb38a75e..0a870b84cf 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -51,6 +51,9 @@
#if CONFIG_PC80_SYSTEM == 1
#include <pc80/i8259.h>
#endif
+#if CONFIG_HAVE_ACPI_RESUME && !CONFIG_S3_VGA_ROM_RUN
+#include <arch/acpi.h>
+#endif
u8 pci_moving_config8(struct device *dev, unsigned int reg)
{
@@ -672,6 +675,14 @@ void pci_dev_init(struct device *dev)
if (ram == NULL)
return;
+#if CONFIG_HAVE_ACPI_RESUME && !CONFIG_S3_VGA_ROM_RUN
+ /* If S3_VGA_ROM_RUN is disabled, skip running VGA option
+ * ROMs when coming out of an S3 resume.
+ */
+ if ((acpi_slp_type == 3) &&
+ ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA))
+ return;
+#endif
run_bios(dev, (unsigned long)ram);
#endif /* CONFIG_PCI_ROM_RUN || CONFIG_VGA_ROM_RUN */
}