diff options
author | Tim Chu <Tim.Chu@quantatw.com> | 2022-12-08 10:12:18 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-23 14:22:57 +0000 |
commit | 96b49b5acbf5328ce2d317a7393db588a928926e (patch) | |
tree | 69dc20b5f4976c2ca445624c9ddfd93bcc20441e /src/soc/intel/common/block/pmc/pmclib.c | |
parent | ef72defdce6e39c41d488db46d555d695310216f (diff) |
soc/intel/cmn/block/pmc: Add pmc_or_mmio32 utility function
Change-Id: I5f9845dd3ea098d990710eaaa2d5db495f876cdd
Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/common/block/pmc/pmclib.c')
-rw-r--r-- | src/soc/intel/common/block/pmc/pmclib.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index 68bde41568..4786fc1b5a 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -367,6 +367,17 @@ void soc_clear_pm_registers(uintptr_t pmc_bar) { } +void pmc_or_mmio32(uint32_t offset, uint32_t ormask) +{ + uint32_t reg; + uintptr_t pmc_bar; + + pmc_bar = soc_read_pmc_base(); + reg = read32p(pmc_bar + offset); + reg |= ormask; + write32p(pmc_bar + offset, reg); +} + void pmc_clear_prsts(void) { uint32_t prsts; |