sb/intel/bd82x6x: Fix flashconsole after lockdown

SMM final locks the SPI BAR, which causes flashconsole to hang.
Re-init it like SMM does with CONFIG_SPI_FLASH_SMM.

Change-Id: Ib802d7ee32f1fb0a68a84b0280480dcaefa9831f
Signed-off-by: Dan Elkouby <streetwalkermc@gmail.com>
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/25660
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Dan Elkouby 2018-04-01 19:54:57 +03:00 committed by Patrick Georgi
parent 3ba380797b
commit 1a93058448
1 changed files with 6 additions and 0 deletions

View File

@ -908,6 +908,12 @@ static void lpc_final(struct device *dev)
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
acpi_is_wakeup_s3()) {
outb(APM_CNT_FINALIZE, APM_CNT);
if (CONFIG(CONSOLE_SPI_FLASH))
/* Re-init SPI driver to handle locked BAR.
This prevents flashconsole from hanging.
If other code needs to use SPI during
ramstage, whitelist it here. */
spi_init();
}
}
}