summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-09-29 16:13:26 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-30 14:49:33 +0000
commit6f9e817bbfd634123b14611ddcb53472bc08783e (patch)
treeac805596c4f4e721d59facb0903db12e6d30eff2
parent25866fe89321ca57aae4dde062db4c88086e187b (diff)
soc/amd/common/block/lpc/espi_util: use [read,write][8,16,32]p
Also include arch/mmio via device/mmio.h and not directly to have the [read,write][8,16,32]p helper functions available. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I51c6f5c73b41546b304f16994d517ed15dbb555f Reviewed-on: https://review.coreboot.org/c/coreboot/+/67980 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
-rw-r--r--src/soc/amd/common/block/lpc/espi_util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c
index c80734d6a2..4fc050b0ee 100644
--- a/src/soc/amd/common/block/lpc/espi_util.c
+++ b/src/soc/amd/common/block/lpc/espi_util.c
@@ -3,7 +3,7 @@
#include <amdblocks/chip.h>
#include <amdblocks/espi.h>
#include <amdblocks/lpc.h>
-#include <arch/mmio.h>
+#include <device/mmio.h>
#include <console/console.h>
#include <espi.h>
#include <soc/pci_devs.h>
@@ -32,32 +32,32 @@ static uintptr_t espi_get_bar(void)
static uint32_t espi_read32(unsigned int reg)
{
- return read32((void *)(espi_get_bar() + reg));
+ return read32p(espi_get_bar() + reg);
}
static void espi_write32(unsigned int reg, uint32_t val)
{
- write32((void *)(espi_get_bar() + reg), val);
+ write32p(espi_get_bar() + reg, val);
}
static uint16_t espi_read16(unsigned int reg)
{
- return read16((void *)(espi_get_bar() + reg));
+ return read16p(espi_get_bar() + reg);
}
static void espi_write16(unsigned int reg, uint16_t val)
{
- write16((void *)(espi_get_bar() + reg), val);
+ write16p(espi_get_bar() + reg, val);
}
static uint8_t espi_read8(unsigned int reg)
{
- return read8((void *)(espi_get_bar() + reg));
+ return read8p(espi_get_bar() + reg);
}
static void espi_write8(unsigned int reg, uint8_t val)
{
- write8((void *)(espi_get_bar() + reg), val);
+ write8p(espi_get_bar() + reg, val);
}
static inline uint32_t espi_decode_io_range_en_bit(unsigned int idx)