diff options
author | Barnali Sarkar <barnali.sarkar@intel.com> | 2017-03-31 18:11:49 +0530 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-05-02 18:26:07 +0200 |
commit | 7146445be9618eb47895782912af28fb627c009d (patch) | |
tree | ec95cd0ab17fecd4ce91bb9b6bff459d9459f3f4 /src/soc/intel/skylake/romstage/romstage.c | |
parent | c261c4b426ac806cca732bb30459f0e6e855828a (diff) | |
download | coreboot-7146445be9618eb47895782912af28fb627c009d.tar.xz |
soc/intel/skylake: Clean up code by using common FAST_SPI module
This patch currently contains the following -
1. Use SOC_INTEL_COMMON_BLOCK_FAST_SPI kconfig for common FAST_SPI code.
2. Perform FAST_SPI programming by calling APIs from common FAST_SPI library.
3. Use common FAST_SPI header file.
Change-Id: I4fc90504d322db70ed4ea644b1593cc0605b5fe8
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/19055
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/skylake/romstage/romstage.c')
-rw-r--r-- | src/soc/intel/skylake/romstage/romstage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/skylake/romstage/romstage.c b/src/soc/intel/skylake/romstage/romstage.c index fb261c3c8b..cb704fd635 100644 --- a/src/soc/intel/skylake/romstage/romstage.c +++ b/src/soc/intel/skylake/romstage/romstage.c @@ -14,8 +14,6 @@ * GNU General Public License for more details. */ -#include <stddef.h> -#include <stdint.h> #include <arch/cpu.h> #include <arch/io.h> #include <arch/cbfs.h> @@ -30,6 +28,7 @@ #include <device/pci.h> #include <device/pci_def.h> #include <elog.h> +#include <intelblocks/fast_spi.h> #include <reset.h> #include <romstage_handoff.h> #include <soc/pci_devs.h> @@ -38,8 +37,9 @@ #include <soc/pmc.h> #include <soc/serialio.h> #include <soc/romstage.h> -#include <soc/spi.h> #include <stage_cache.h> +#include <stddef.h> +#include <stdint.h> #include <timestamp.h> #include <vendorcode/google/chromeos/chromeos.h> @@ -58,7 +58,7 @@ int get_sw_write_protect_state(void) u8 status; /* Return unprotected status if status read fails. */ - return early_spi_read_wpsr(&status) ? 0 : !!(status & 0x80); + return fast_spi_flash_read_wpsr(&status) ? 0 : !!(status & 0x80); } /* UPD parameters to be initialized before MemoryInit */ |