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:
parent
349a145299
commit
e5d3b4e36e
|
@ -4,6 +4,7 @@
|
||||||
#include <acpi/acpigen.h>
|
#include <acpi/acpigen.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <device/mmio.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <device/pci_ops.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)
|
static void acp_update32(uintptr_t bar, uint32_t reg, uint32_t clear, uint32_t set)
|
||||||
{
|
{
|
||||||
uint32_t val;
|
clrsetbits32((void *)(bar + reg), clear, set);
|
||||||
|
|
||||||
val = read32((void *)(bar + reg));
|
|
||||||
val &= ~clear;
|
|
||||||
val |= set;
|
|
||||||
write32((void *)(bar + reg), val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init(struct device *dev)
|
static void init(struct device *dev)
|
||||||
|
|
Loading…
Reference in New Issue