aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-02-19 22:01:55 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-03-01 19:43:04 +0000
commit5d98dabb4e10cb93cae9b43f47dc3c4fe1fefd5f (patch)
tree195662824e02eed68659fd6a6b54087ac8439cbb /src
parent43026ba81966a9f065435a68a6ca8bd69005fe19 (diff)
soc/intel: Drop `bootblock_cpu_init()` function
Just call `fast_spi_cache_bios_region()` directly instead. Change-Id: I99f6ed4cf1a5c49b078cfd05e357c2d4c26ade45 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50952 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/alderlake/Makefile.inc1
-rw-r--r--src/soc/intel/alderlake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/alderlake/bootblock/cpu.c20
-rw-r--r--src/soc/intel/alderlake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/cannonlake/Makefile.inc1
-rw-r--r--src/soc/intel/cannonlake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/cannonlake/bootblock/cpu.c10
-rw-r--r--src/soc/intel/cannonlake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/elkhartlake/Makefile.inc1
-rw-r--r--src/soc/intel/elkhartlake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/elkhartlake/bootblock/cpu.c15
-rw-r--r--src/soc/intel/elkhartlake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/icelake/Makefile.inc1
-rw-r--r--src/soc/intel/icelake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/icelake/bootblock/cpu.c18
-rw-r--r--src/soc/intel/icelake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/jasperlake/Makefile.inc1
-rw-r--r--src/soc/intel/jasperlake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/jasperlake/bootblock/cpu.c18
-rw-r--r--src/soc/intel/jasperlake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/skylake/Makefile.inc1
-rw-r--r--src/soc/intel/skylake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/skylake/bootblock/cpu.c9
-rw-r--r--src/soc/intel/skylake/include/soc/bootblock.h1
-rw-r--r--src/soc/intel/tigerlake/Makefile.inc1
-rw-r--r--src/soc/intel/tigerlake/bootblock/bootblock.c3
-rw-r--r--src/soc/intel/tigerlake/bootblock/cpu.c24
-rw-r--r--src/soc/intel/tigerlake/include/soc/bootblock.h1
28 files changed, 14 insertions, 135 deletions
diff --git a/src/soc/intel/alderlake/Makefile.inc b/src/soc/intel/alderlake/Makefile.inc
index fc3d63e0fa..bb731a1b14 100644
--- a/src/soc/intel/alderlake/Makefile.inc
+++ b/src/soc/intel/alderlake/Makefile.inc
@@ -15,7 +15,6 @@ all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += espi.c
diff --git a/src/soc/intel/alderlake/bootblock/bootblock.c b/src/soc/intel/alderlake/bootblock/bootblock.c
index 96e6268f74..b8086a42ab 100644
--- a/src/soc/intel/alderlake/bootblock/bootblock.c
+++ b/src/soc/intel/alderlake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
@@ -16,7 +17,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/alderlake/bootblock/cpu.c b/src/soc/intel/alderlake/bootblock/cpu.c
deleted file mode 100644
index 4225358de5..0000000000
--- a/src/soc/intel/alderlake/bootblock/cpu.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-/*
- * This file is created based on Intel Alder Lake Processor PCH Datasheet
- * Document number: 621483
- * Chapter number: 7
- */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /*
- * Alderlake platform doesn't support booting from any other media
- * than SPI flash and on IA platform SPI is memory mapped hence
- * enabling temporary caching of memory-mapped spi boot media.
- */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/alderlake/include/soc/bootblock.h b/src/soc/intel/alderlake/include/soc/bootblock.h
index 087d29f741..0cf334fe09 100644
--- a/src/soc/intel/alderlake/include/soc/bootblock.h
+++ b/src/soc/intel/alderlake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_ALDERLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc
index 28b5ad0170..d212d94fc3 100644
--- a/src/soc/intel/cannonlake/Makefile.inc
+++ b/src/soc/intel/cannonlake/Makefile.inc
@@ -10,7 +10,6 @@ subdirs-y += ../../../cpu/x86/tsc
subdirs-y += ../../../cpu/intel/common
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += pmutil.c
bootblock-y += bootblock/report_platform.c
diff --git a/src/soc/intel/cannonlake/bootblock/bootblock.c b/src/soc/intel/cannonlake/bootblock/bootblock.c
index 255bac86d9..dfa0bd00b5 100644
--- a/src/soc/intel/cannonlake/bootblock/bootblock.c
+++ b/src/soc/intel/cannonlake/bootblock/bootblock.c
@@ -2,6 +2,7 @@
#include <bootblock_common.h>
#include <cpu/x86/mtrr.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/gspi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
@@ -52,7 +53,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/cannonlake/bootblock/cpu.c b/src/soc/intel/cannonlake/bootblock/cpu.c
deleted file mode 100644
index 30c1a412ea..0000000000
--- a/src/soc/intel/cannonlake/bootblock/cpu.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /* Temporarily cache the memory-mapped boot media. */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/cannonlake/include/soc/bootblock.h b/src/soc/intel/cannonlake/include/soc/bootblock.h
index 6ac2bc281e..dea7d471a5 100644
--- a/src/soc/intel/cannonlake/include/soc/bootblock.h
+++ b/src/soc/intel/cannonlake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_CANNONLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/elkhartlake/Makefile.inc b/src/soc/intel/elkhartlake/Makefile.inc
index 5c46f86738..371f9523f0 100644
--- a/src/soc/intel/elkhartlake/Makefile.inc
+++ b/src/soc/intel/elkhartlake/Makefile.inc
@@ -16,7 +16,6 @@ all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += espi.c
diff --git a/src/soc/intel/elkhartlake/bootblock/bootblock.c b/src/soc/intel/elkhartlake/bootblock/bootblock.c
index 96e6268f74..b8086a42ab 100644
--- a/src/soc/intel/elkhartlake/bootblock/bootblock.c
+++ b/src/soc/intel/elkhartlake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
@@ -16,7 +17,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/elkhartlake/bootblock/cpu.c b/src/soc/intel/elkhartlake/bootblock/cpu.c
deleted file mode 100644
index bbce44cd60..0000000000
--- a/src/soc/intel/elkhartlake/bootblock/cpu.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /*
- * Elkhartlake platform doesn't support booting from any other media
- * (like eMMC on APL/GLK platform) than only booting from SPI device
- * and on IA platform SPI is memory mapped hence enabling temporarily
- * caching on memory-mapped spi boot media.
- */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/elkhartlake/include/soc/bootblock.h b/src/soc/intel/elkhartlake/include/soc/bootblock.h
index 2dc50c1ddc..1173bbeeac 100644
--- a/src/soc/intel/elkhartlake/include/soc/bootblock.h
+++ b/src/soc/intel/elkhartlake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_ELKHARTLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/icelake/Makefile.inc b/src/soc/intel/icelake/Makefile.inc
index 05f4846963..05e11f2e32 100644
--- a/src/soc/intel/icelake/Makefile.inc
+++ b/src/soc/intel/icelake/Makefile.inc
@@ -16,7 +16,6 @@ all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += espi.c
diff --git a/src/soc/intel/icelake/bootblock/bootblock.c b/src/soc/intel/icelake/bootblock/bootblock.c
index df1fb56234..ef5ada6239 100644
--- a/src/soc/intel/icelake/bootblock/bootblock.c
+++ b/src/soc/intel/icelake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
@@ -16,7 +17,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/icelake/bootblock/cpu.c b/src/soc/intel/icelake/bootblock/cpu.c
deleted file mode 100644
index bf5fc1be65..0000000000
--- a/src/soc/intel/icelake/bootblock/cpu.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /*
- * Icelake platform doesn't support booting from any other media
- * (like eMMC on APL/GLK platform) than only booting from SPI device
- * and on IA platform SPI is memory mapped hence enabling temporarily
- * cacheing on memory-mapped spi boot media.
- *
- * This assumption will not hold good for APL/GLK platform where boot
- * from eMMC is also possible options.
- */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/icelake/include/soc/bootblock.h b/src/soc/intel/icelake/include/soc/bootblock.h
index f22b2665ec..cdc350f74a 100644
--- a/src/soc/intel/icelake/include/soc/bootblock.h
+++ b/src/soc/intel/icelake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_ICELAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/jasperlake/Makefile.inc b/src/soc/intel/jasperlake/Makefile.inc
index 677b5f3c52..ccff1e077f 100644
--- a/src/soc/intel/jasperlake/Makefile.inc
+++ b/src/soc/intel/jasperlake/Makefile.inc
@@ -16,7 +16,6 @@ all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += espi.c
diff --git a/src/soc/intel/jasperlake/bootblock/bootblock.c b/src/soc/intel/jasperlake/bootblock/bootblock.c
index 96e6268f74..b8086a42ab 100644
--- a/src/soc/intel/jasperlake/bootblock/bootblock.c
+++ b/src/soc/intel/jasperlake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
@@ -16,7 +17,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/jasperlake/bootblock/cpu.c b/src/soc/intel/jasperlake/bootblock/cpu.c
deleted file mode 100644
index 292733acee..0000000000
--- a/src/soc/intel/jasperlake/bootblock/cpu.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /*
- * Jasperlake platform doesn't support booting from any other media
- * (like eMMC on APL/GLK platform) than only booting from SPI device
- * and on IA platform SPI is memory mapped hence enabling temporarily
- * cacheing on memory-mapped spi boot media.
- *
- * This assumption will not hold good for APL/GLK platform where boot
- * from eMMC is also possible options.
- */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/jasperlake/include/soc/bootblock.h b/src/soc/intel/jasperlake/include/soc/bootblock.h
index 413ae4f83b..678a2c4678 100644
--- a/src/soc/intel/jasperlake/include/soc/bootblock.h
+++ b/src/soc/intel/jasperlake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_JASPERLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/skylake/Makefile.inc b/src/soc/intel/skylake/Makefile.inc
index de516c1bbb..1d36feb438 100644
--- a/src/soc/intel/skylake/Makefile.inc
+++ b/src/soc/intel/skylake/Makefile.inc
@@ -11,7 +11,6 @@ subdirs-y += ../../../cpu/x86/smm
subdirs-y += ../../../cpu/x86/tsc
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += i2c.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
diff --git a/src/soc/intel/skylake/bootblock/bootblock.c b/src/soc/intel/skylake/bootblock/bootblock.c
index 65c631a6e2..7b8b147aaa 100644
--- a/src/soc/intel/skylake/bootblock/bootblock.c
+++ b/src/soc/intel/skylake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/gspi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
@@ -17,7 +18,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
diff --git a/src/soc/intel/skylake/bootblock/cpu.c b/src/soc/intel/skylake/bootblock/cpu.c
deleted file mode 100644
index bf487c3623..0000000000
--- a/src/soc/intel/skylake/bootblock/cpu.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/skylake/include/soc/bootblock.h b/src/soc/intel/skylake/include/soc/bootblock.h
index 5e677357b0..90c4a405b6 100644
--- a/src/soc/intel/skylake/include/soc/bootblock.h
+++ b/src/soc/intel/skylake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_SKYLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */
diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc
index f20640617e..baa9261f22 100644
--- a/src/soc/intel/tigerlake/Makefile.inc
+++ b/src/soc/intel/tigerlake/Makefile.inc
@@ -16,7 +16,6 @@ all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
-bootblock-y += bootblock/cpu.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += espi.c
diff --git a/src/soc/intel/tigerlake/bootblock/bootblock.c b/src/soc/intel/tigerlake/bootblock/bootblock.c
index 96e6268f74..b8086a42ab 100644
--- a/src/soc/intel/tigerlake/bootblock/bootblock.c
+++ b/src/soc/intel/tigerlake/bootblock/bootblock.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <intelblocks/fast_spi.h>
#include <intelblocks/systemagent.h>
#include <intelblocks/tco.h>
#include <intelblocks/uart.h>
@@ -16,7 +17,7 @@ void bootblock_soc_early_init(void)
{
bootblock_systemagent_early_init();
bootblock_pch_early_init();
- bootblock_cpu_init();
+ fast_spi_cache_bios_region();
pch_early_iorange_init();
if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
uart_bootblock_init();
diff --git a/src/soc/intel/tigerlake/bootblock/cpu.c b/src/soc/intel/tigerlake/bootblock/cpu.c
deleted file mode 100644
index ed9381c2f3..0000000000
--- a/src/soc/intel/tigerlake/bootblock/cpu.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-/*
- * This file is created based on Intel Tiger Lake Processor PCH Datasheet
- * Document number: 575857
- * Chapter number: 6
- */
-
-#include <intelblocks/fast_spi.h>
-#include <soc/bootblock.h>
-
-void bootblock_cpu_init(void)
-{
- /*
- * Tigerlake platform doesn't support booting from any other media
- * (like eMMC on APL/GLK platform) than only booting from SPI device
- * and on IA platform SPI is memory mapped hence enabling temporarily
- * cacheing on memory-mapped spi boot media.
- *
- * This assumption will not hold good for APL/GLK platform where boot
- * from eMMC is also possible options.
- */
- fast_spi_cache_bios_region();
-}
diff --git a/src/soc/intel/tigerlake/include/soc/bootblock.h b/src/soc/intel/tigerlake/include/soc/bootblock.h
index 87be0e0a70..71a16a5fa2 100644
--- a/src/soc/intel/tigerlake/include/soc/bootblock.h
+++ b/src/soc/intel/tigerlake/include/soc/bootblock.h
@@ -4,7 +4,6 @@
#define _SOC_TIGERLAKE_BOOTBLOCK_H_
/* Bootblock pre console init programming */
-void bootblock_cpu_init(void);
void bootblock_pch_early_init(void);
/* Bootblock post console init programming */