From 4c466c9c9624a02d287092f1cfa87fde77f0cb3c Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 5 Jun 2020 19:00:41 +0200 Subject: device/pnp_ops.h: Use pnp.h functions With BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical. Change-Id: I3ca080e700cf7b7f5b76cadddc7e41960413433c Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/42133 Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/include/device/pnp_ops.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/include/device/pnp_ops.h b/src/include/device/pnp_ops.h index 039c9aaadb..0cfdd61c27 100644 --- a/src/include/device/pnp_ops.h +++ b/src/include/device/pnp_ops.h @@ -5,6 +5,7 @@ #include #include +#include #include #if ENV_PNP_SIMPLE_DEVICE @@ -12,17 +13,13 @@ static __always_inline void pnp_write_config( pnp_devfn_t dev, uint8_t reg, uint8_t value) { - unsigned int port = dev >> 8; - outb(reg, port); - outb(value, port + 1); + pnp_write_index(dev >> 8, reg, value); } static __always_inline uint8_t pnp_read_config( pnp_devfn_t dev, uint8_t reg) { - unsigned int port = dev >> 8; - outb(reg, port); - return inb(port + 1); + return pnp_read_index(dev >> 8, reg); } static __always_inline -- cgit v1.2.3