From d2e423fc8d56b692c1f754da0fda686e726779a3 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 25 Nov 2021 09:39:53 +0100 Subject: [PATCH] oprom/yabel/io.c: Fix building for ENV_X86_64 Unknown if yabel works for X86_64 but now it builds. Change-Id: Iacdb9fde91a992b5010120f5824383ca4aebdd1a Signed-off-by: Arthur Heymans Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/59661 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/device/oprom/yabel/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device/oprom/yabel/io.c b/src/device/oprom/yabel/io.c index 051a601569..2a4e6f86fd 100644 --- a/src/device/oprom/yabel/io.c +++ b/src/device/oprom/yabel/io.c @@ -103,7 +103,7 @@ read_io(void *addr, size_t sz) { unsigned int ret; /* since we are using inb instructions, we need the port number as 16bit value */ - u16 port = (u16)(u32) addr; + u16 port = (u16)(uintptr_t) addr; switch (sz) { case 1: @@ -125,7 +125,7 @@ read_io(void *addr, size_t sz) static int write_io(void *addr, unsigned int value, size_t sz) { - u16 port = (u16)(u32) addr; + u16 port = (u16)(uintptr_t) addr; switch (sz) { /* since we are using inb instructions, we need the port number as 16bit value */ case 1: