Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48842 )
Change subject: soc/amd: Add an option to select if SOC supports ESPI sub decode ......................................................................
soc/amd: Add an option to select if SOC supports ESPI sub decode
Cezanne doesn't have eSPIx00034 register define in PPR. Currently only Picasso need this option.
Change-Id: Icb8e8a1a59393849395125108bfaa884839ce10f Signed-off-by: Zheng Bao fishbaozi@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/48842 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/common/block/lpc/Kconfig M src/soc/amd/common/block/lpc/espi_util.c M src/soc/amd/picasso/Kconfig 3 files changed, 8 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/soc/amd/common/block/lpc/Kconfig b/src/soc/amd/common/block/lpc/Kconfig index 1ec8dd4..3aaccf3 100644 --- a/src/soc/amd/common/block/lpc/Kconfig +++ b/src/soc/amd/common/block/lpc/Kconfig @@ -24,3 +24,8 @@ help Select this option if mainboard uses eSPI instead of LPC (if supported by platform). + +config SOC_AMD_COMMON_BLOCK_HAS_ESPI_SUB_DECODE + bool + depends on SOC_AMD_COMMON_BLOCK_HAS_ESPI + default n diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c index 0878fb7..7ee5386 100644 --- a/src/soc/amd/common/block/lpc/espi_util.c +++ b/src/soc/amd/common/block/lpc/espi_util.c @@ -916,7 +916,8 @@ }
/* Enable subtractive decode if configured */ - espi_setup_subtractive_decode(cfg); + if (CONFIG(SOC_AMD_COMMON_BLOCK_HAS_ESPI_SUB_DECODE)) + espi_setup_subtractive_decode(cfg);
return 0; } diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig index da3903b..93d2ef8 100644 --- a/src/soc/amd/picasso/Kconfig +++ b/src/soc/amd/picasso/Kconfig @@ -29,6 +29,7 @@ select SOC_AMD_COMMON select SOC_AMD_COMMON_BLOCK_NONCAR select SOC_AMD_COMMON_BLOCK_HAS_ESPI + select SOC_AMD_COMMON_BLOCK_HAS_ESPI_SUB_DECODE select SOC_AMD_COMMON_BLOCK_IOMMU select SOC_AMD_COMMON_BLOCK_ACPIMMIO select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS