soc/intel/common/block/gpmr: Disable GPMR regs if ext-BIOS is disabled

General Purpose Memory Range registers are only used if extended BIOS
region is enabled now, this patch wraps the related code with Kconfig
item `CONFIG_FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW`.

Change-Id: I975840684b3dd9e9e76ec6a08de12d8dd3c8f08a
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85041
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
This commit is contained in:
Yuchi Chen 2024-11-08 14:18:08 +08:00 committed by Lean Sheng Tan
commit 7cfdb3bc1a
2 changed files with 3 additions and 1 deletions

View file

@ -12,6 +12,6 @@ config USE_SOC_GPMR_DEFS
bool
default n
help
Specify if the SoC have specific GPMR register definitions.
Specify if the SoC has specific GPMR register definitions.
endif

View file

@ -33,6 +33,7 @@ void gpmr_or32(uint16_t offset, uint32_t ordata)
return pcr_or32(PID_DMI, offset, ordata);
}
#if CONFIG(FAST_SPI_SUPPORTS_EXT_BIOS_WINDOW)
/* Check for available free gpmr */
static int get_available_gpmr(void)
{
@ -85,3 +86,4 @@ enum cb_err enable_gpmr(uint32_t base, uint32_t size, uint32_t dest_id)
return CB_SUCCESS;
}
#endif