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>
This commit is contained in:
Felix Held 2021-04-20 00:39:55 +02:00 committed by Marshall Dawson
parent 349a145299
commit e5d3b4e36e
1 changed files with 2 additions and 6 deletions

View File

@ -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)