aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-04-20 00:39:55 +0200
committerMarshall Dawson <marshalldawson3rd@gmail.com>2021-04-21 03:20:38 +0000
commite5d3b4e36e1e9ac6701a6f337b601420c7d88779 (patch)
tree8daedc429ecd609dfdf21784fb4df35d458323f4 /src
parent349a1452992ff6dc11dc874d7c11c50bf777a937 (diff)
soc/amd/picasso/acp: use clrsetbits32 in acp_update32
Use existing functionality instead of reinventing it. TEST=none Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Iaeab5cce05ccd860bc8de3775b7d1420653497a3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52525 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/picasso/acp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/soc/amd/picasso/acp.c b/src/soc/amd/picasso/acp.c
index 822c48a119..d1ae21cec4 100644
--- a/src/soc/amd/picasso/acp.c
+++ b/src/soc/amd/picasso/acp.c
@@ -4,6 +4,7 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
+#include <device/mmio.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
@@ -17,12 +18,7 @@
static void acp_update32(uintptr_t bar, uint32_t reg, uint32_t clear, uint32_t set)
{
- uint32_t val;
-
- val = read32((void *)(bar + reg));
- val &= ~clear;
- val |= set;
- write32((void *)(bar + reg), val);
+ clrsetbits32((void *)(bar + reg), clear, set);
}
static void init(struct device *dev)