summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/common/block/fast_spi/fast_spi.c
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2022-09-12 06:34:04 +0200
committerPaul Fagerburg <pfagerburg@chromium.org>2022-09-22 15:34:29 +0000
commit826b45b69b9dd492771798679d3a8223a954217f (patch)
tree5318908f4bd3b2bc981218f5846e666421ddc276 /src/soc/intel/common/block/fast_spi/fast_spi.c
parent777099046f88f96921e21ad2e0a58b2fe66b25aa (diff)
downloadcoreboot-826b45b69b9dd492771798679d3a8223a954217f.tar.gz
coreboot-826b45b69b9dd492771798679d3a8223a954217f.tar.bz2
coreboot-826b45b69b9dd492771798679d3a8223a954217f.zip
common/block/fast_spi: Add extended BIOS window as reserved region
The fast SPI driver reports the BIOS window as reserved so that the OS is aware of this region. Now that platforms which supports an extended BIOS window are added to this driver, add the extended range as reserved as well if it is enabled. And since this is now handled in the SPI driver itself, remove the extended BIOS region reporting from common systemagent code. Change-Id: Ib5c735bffcb389be07c876d7b5b2d88c545a0b03 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67529 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/soc/intel/common/block/fast_spi/fast_spi.c')
-rw-r--r--src/soc/intel/common/block/fast_spi/fast_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c
index e46effcc4e89..78225ec0d80f 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi.c
+++ b/src/soc/intel/common/block/fast_spi/fast_spi.c
@@ -530,6 +530,11 @@ static void fast_spi_read_resources(struct device *dev)
/* Add SPI flash MMIO window as a reserved resource. */
mmio_resource_kb(dev, 0, FLASH_BASE_ADDR / KiB, FLASH_MMIO_SIZE / KiB);
+ /* Add extended SPI flash MMIO window as reserved resource if enabled. */
+ if (CONFIG(FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW)) {
+ mmio_resource_kb(dev, 1, CONFIG_EXT_BIOS_WIN_BASE / KiB,
+ CONFIG_EXT_BIOS_WIN_SIZE / KiB);
+ }
}
static struct device_operations fast_spi_dev_ops = {