summaryrefslogtreecommitdiffstats
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-12-19 23:43:56 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-02-06 07:33:51 +0000
commit0f30063abf4fa29ba6671dcbab7879334f7bd013 (patch)
treeb17043fd82103435f6ae5acf15e9924facd5d06c /src/device/pci_device.c
parent021c621eb0c8b21a34902519da595df94a973414 (diff)
downloadcoreboot-0f30063abf4fa29ba6671dcbab7879334f7bd013.tar.gz
coreboot-0f30063abf4fa29ba6671dcbab7879334f7bd013.tar.bz2
coreboot-0f30063abf4fa29ba6671dcbab7879334f7bd013.zip
soc/intel/broadwell: Conditionally skip PRE_GRAPHICS_DELAY
It was commented that the need for the delay was mainly related to external displays and only with VBIOS execution. Move the delay such that it is done only when we actually need to execute the VBIOS aka option rom. A delay is currently only defined for librem/purism_bdw in its Kconfig. As the description of the issue sounds like it would equally happen on other platforms when VBIOS is involved, promote the Kconfig visible option to global scope. Change-Id: I4503158576f35057373f003586bbf76af4d59b3d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48787 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 66f5447126da..cd98f076054d 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -732,6 +732,12 @@ static int should_load_oprom(struct device *dev)
return 0;
}
+static void oprom_pre_graphics_stall(void)
+{
+ if (CONFIG_PRE_GRAPHICS_DELAY)
+ mdelay(CONFIG_PRE_GRAPHICS_DELAY);
+}
+
/** Default handler: only runs the relevant PCI BIOS. */
void pci_dev_init(struct device *dev)
{
@@ -760,6 +766,9 @@ void pci_dev_init(struct device *dev)
if (!should_run_oprom(dev, rom))
return;
+ /* Wait for any configured pre-graphics delay */
+ oprom_pre_graphics_stall();
+
run_bios(dev, (unsigned long)ram);
gfx_set_init_done(1);