aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/common/block/fast_spi/fast_spi.c7
-rw-r--r--src/soc/intel/common/block/fast_spi/fast_spi_def.h2
-rw-r--r--src/soc/intel/common/block/include/intelblocks/fast_spi.h4
3 files changed, 13 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 ed2e8f2b39..4fa10b0bb7 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi.c
+++ b/src/soc/intel/common/block/fast_spi/fast_spi.c
@@ -457,6 +457,13 @@ void fast_spi_disable_wp(void)
pci_write_config8(dev, SPI_BIOS_CONTROL, bios_cntl);
}
+void fast_spi_set_bde(void)
+{
+ const pci_devfn_t dev = PCH_DEV_SPI;
+
+ pci_or_config32(dev, SPI_BIOS_DECODE_EN, SPI_BIOS_DECODE_LOCK);
+}
+
void fast_spi_clear_outstanding_status(void)
{
void *spibar = fast_spi_get_bar();
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_def.h b/src/soc/intel/common/block/fast_spi/fast_spi_def.h
index 4012c29624..af46ccb964 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi_def.h
+++ b/src/soc/intel/common/block/fast_spi/fast_spi_def.h
@@ -4,6 +4,8 @@
#define SOC_INTEL_COMMON_BLOCK_FAST_SPI_DEF_H
/* PCI configuration registers */
+#define SPI_BIOS_DECODE_EN 0xd8
+#define SPI_BIOS_DECODE_LOCK BIT(31)
#define SPI_BIOS_CONTROL 0xdc
diff --git a/src/soc/intel/common/block/include/intelblocks/fast_spi.h b/src/soc/intel/common/block/include/intelblocks/fast_spi.h
index 90f1cb224e..716f16a07a 100644
--- a/src/soc/intel/common/block/include/intelblocks/fast_spi.h
+++ b/src/soc/intel/common/block/include/intelblocks/fast_spi.h
@@ -103,5 +103,9 @@ uint32_t soc_get_spi_psf_destination_id(void);
*/
struct postcar_frame;
void fast_spi_cache_ext_bios_postcar(struct postcar_frame *pcf);
+/*
+ * Set FAST_SPIBAR BIOS Decode Lock bit
+ */
+void fast_spi_set_bde(void);
#endif /* SOC_INTEL_COMMON_BLOCK_FAST_SPI_H */