soc/intel/apollolake: 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: Ifd72734dadda541fe4c828e4f1716e532ec69c27
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/19080
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>
This commit is contained in:
Barnali Sarkar
2017-03-28 16:32:33 +05:30
committed by Furquan Shaikh
parent 7146445be9
commit e70142c9c2
8 changed files with 9 additions and 540 deletions

View File

@@ -24,6 +24,7 @@
#include <cpu/x86/mp.h>
#include <device/device.h>
#include <device/pci.h>
#include <intelblocks/fast_spi.h>
#include <fsp/api.h>
#include <fsp/util.h>
#include <intelblocks/itss.h>
@@ -31,7 +32,6 @@
#include <soc/iomap.h>
#include <soc/itss.h>
#include <soc/cpu.h>
#include <soc/flash_ctrlr.h>
#include <soc/intel/common/vbt.h>
#include <soc/nvs.h>
#include <soc/pci_devs.h>
@@ -578,7 +578,7 @@ void platform_fsp_notify_status(enum fsp_notify_phase phase)
*/
static void spi_flash_init_cb(void *unused)
{
spi_flash_init();
fast_spi_init();
}
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, spi_flash_init_cb, NULL);