soc/intel/jasperlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This eliminates platform-specific SPI code by leveraging the common driver with platform-specific Kconfig and macros. This commit: - Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN in Kconfig - Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3 - Removes src/soc/intel/jasperlake/spi.c - Updates Makefile.mk to remove spi.c compilation Note: This platform does not use PSF destination ID. The common code uses SOC_GSPI_DEVFN(n) macro directly. Change-Id: If42aa1f955bc0aae2698aac35dbe23b79c68bf09 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91324 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
91520ab096
commit
47f3e7e3cc
3 changed files with 5 additions and 18 deletions
|
|
@ -57,6 +57,7 @@ config SOC_INTEL_JASPERLAKE
|
|||
select SOC_INTEL_COMMON_BLOCK_XHCI_ELOG
|
||||
select SOC_INTEL_COMMON_FEATURE
|
||||
select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN
|
||||
select SOC_INTEL_COMMON_FEATURE_SPI_DEVFN
|
||||
select SOC_INTEL_COMMON_FEATURE_I2C_DEVFN
|
||||
select SOC_INTEL_COMMON_FEATURE_UART_DEVICES
|
||||
select SOC_INTEL_COMMON_FSP_RESET
|
||||
|
|
@ -215,4 +216,8 @@ config INTEL_GMA_BCLM_OFFSET
|
|||
|
||||
config INTEL_GMA_BCLM_WIDTH
|
||||
default 32
|
||||
|
||||
config SOC_INTEL_SPI_DEV_MAX
|
||||
int
|
||||
default 3
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ subdirs-y += ../../../cpu/intel/turbo
|
|||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += pmutil.c
|
||||
all-y += spi.c
|
||||
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
bootblock-y += bootblock/pch.c
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <intelblocks/spi.h>
|
||||
#include <soc/pci_devs.h>
|
||||
|
||||
int spi_soc_devfn_to_bus(unsigned int devfn)
|
||||
{
|
||||
switch (devfn) {
|
||||
case PCH_DEVFN_GSPI0:
|
||||
return 1;
|
||||
case PCH_DEVFN_GSPI1:
|
||||
return 2;
|
||||
case PCH_DEVFN_GSPI2:
|
||||
return 3;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue