summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-09-29 16:16:48 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-30 14:49:49 +0000
commitb7a4a430c0d89129d48fbc76b3dc9bb554882022 (patch)
tree7d27d64849fd44fcddf22e3a84b548b01bc253a6
parent51f60578bbf1cfdbf22859844d4ed13dad3faa7f (diff)
soc/amd/common/block/smbus/smbus: use [read,write]8p to avoid typecasts
Also add missing device/mmio.h include. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I0f3f7ea36896c8e55c62acd93fe8fc4fb7c74b8a Reviewed-on: https://review.coreboot.org/c/coreboot/+/67982 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/smbus/smbus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/soc/amd/common/block/smbus/smbus.c b/src/soc/amd/common/block/smbus/smbus.c
index d2faf79e74..1a97e523bb 100644
--- a/src/soc/amd/common/block/smbus/smbus.c
+++ b/src/soc/amd/common/block/smbus/smbus.c
@@ -2,6 +2,7 @@
#include <inttypes.h>
#include <console/console.h>
+#include <device/mmio.h>
#include <device/smbus_host.h>
#include <amdblocks/acpimmio.h>
#include <amdblocks/smbus.h>
@@ -18,12 +19,12 @@
static u8 controller_read8(const uintptr_t base, const u8 reg)
{
- return read8((void *)(base + reg));
+ return read8p(base + reg);
}
static void controller_write8(const uintptr_t base, const u8 reg, const u8 val)
{
- write8((void *)(base + reg), val);
+ write8p(base + reg, val);
}
static int smbus_wait_until_ready(uintptr_t mmio)