soc/intel/common/block/gpmr: Allow soc to have specific gpmr definition

This patch add a new Kconfig HAVE_SPECIFIC_GPMR and use it to include
soc/gpmr.h if necessary.

Change-Id: I94797a72af75fc96ab2cacb1d46b581605a15387
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83317
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Yuchi Chen
2024-06-25 10:56:10 +08:00
committed by Felix Held
parent eb28f3da7d
commit 933031b524
2 changed files with 16 additions and 0 deletions

View File

@@ -5,3 +5,13 @@ config SOC_INTEL_COMMON_BLOCK_GPMR
select SOC_INTEL_COMMON_BLOCK_PCR
help
Intel Processor common GPMR support
if SOC_INTEL_COMMON_BLOCK_GPMR
config USE_SOC_GPMR_DEFS
bool
default n
help
Specify if the SoC have specific GPMR register definitions.
endif

View File

@@ -3,6 +3,10 @@
#ifndef SOC_INTEL_COMMON_BLOCK_PCR_GPMR_H
#define SOC_INTEL_COMMON_BLOCK_PCR_GPMR_H
#if CONFIG(USE_SOC_GPMR_DEFS)
#include <soc/pcr_gpmr.h>
#else
#define GPMR_LPCLGIR1 0x2730
#define GPMR_DMICTL 0x2234
#define GPMR_DMICTL_SRLOCK (1 << 31)
@@ -24,4 +28,6 @@
#define GPMR_DID_OFFSET(x) (0x2780 + (x) * 8)
#define GPMR_EN BIT(31)
#endif
#endif /* SOC_INTEL_COMMON_BLOCK_PCR_GPMR_H */