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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42133 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
a0eb64ad33
commit
4c466c9c96
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <device/pnp.h>
|
||||||
#include <device/pnp_type.h>
|
#include <device/pnp_type.h>
|
||||||
|
|
||||||
#if ENV_PNP_SIMPLE_DEVICE
|
#if ENV_PNP_SIMPLE_DEVICE
|
||||||
@ -12,17 +13,13 @@
|
|||||||
static __always_inline void pnp_write_config(
|
static __always_inline void pnp_write_config(
|
||||||
pnp_devfn_t dev, uint8_t reg, uint8_t value)
|
pnp_devfn_t dev, uint8_t reg, uint8_t value)
|
||||||
{
|
{
|
||||||
unsigned int port = dev >> 8;
|
pnp_write_index(dev >> 8, reg, value);
|
||||||
outb(reg, port);
|
|
||||||
outb(value, port + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __always_inline uint8_t pnp_read_config(
|
static __always_inline uint8_t pnp_read_config(
|
||||||
pnp_devfn_t dev, uint8_t reg)
|
pnp_devfn_t dev, uint8_t reg)
|
||||||
{
|
{
|
||||||
unsigned int port = dev >> 8;
|
return pnp_read_index(dev >> 8, reg);
|
||||||
outb(reg, port);
|
|
||||||
return inb(port + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __always_inline
|
static __always_inline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user