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>
This commit is contained in:
parent
51f60578bb
commit
b7a4a430c0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue