diff options
author | Subrata Banik <subratabanik@google.com> | 2022-04-13 11:58:08 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-04-14 15:41:12 +0000 |
commit | e7089e12a13e96e61216d94db85a1c6a1347449d (patch) | |
tree | 64c755d63ddbaa25074d64c1c39d7cb77136dea6 /src/soc/intel/common/block/gpmr | |
parent | bb1ecc56624fc57b030cbbada2add6cc3bfd004e (diff) |
soc/intel/cmn/gpmr: Enhance GPMR driver
This patch enhances the GPMR driver to add public APIs for other IA
common code drivers and/or SoC code to utilize.
Also, migrated all PCR GPMR register definitions into the common
`pcr_gpmr.h` header file.
TEST=Able to build and boot google/redrix.
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I87dca55a068366cb9a26a5218589166c1723da7f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/soc/intel/common/block/gpmr')
-rw-r--r-- | src/soc/intel/common/block/gpmr/gpmr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/gpmr/gpmr.c b/src/soc/intel/common/block/gpmr/gpmr.c index 1a3a6023d6..d0fe499be0 100644 --- a/src/soc/intel/common/block/gpmr/gpmr.c +++ b/src/soc/intel/common/block/gpmr/gpmr.c @@ -2,6 +2,7 @@ #include <console/console.h> #include <intelblocks/dmi.h> +#include <intelblocks/gpmr.h> #include <intelblocks/pcr.h> #include <soc/pcr_ids.h> @@ -16,17 +17,22 @@ #define DMI_PCR_GPMR_EN BIT(31) /* GPMR Register read given offset */ -static uint32_t gpmr_read32(uint16_t offset) +uint32_t gpmr_read32(uint16_t offset) { return pcr_read32(PID_DMI, offset); } /* GPMR Register write given offset and val */ -static void gpmr_write32(uint16_t offset, uint32_t val) +void gpmr_write32(uint16_t offset, uint32_t val) { return pcr_write32(PID_DMI, offset, val); } +void gpmr_or32(uint16_t offset, uint32_t ordata) +{ + return pcr_or32(PID_DMI, offset, ordata); +} + /* Check for available free gpmr */ static int get_available_gpmr(void) { |