summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-08-26 19:52:40 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-09-14 19:34:11 +0000
commit79a3de16a177d9c65f366ff413f5ba06c6cc63b4 (patch)
tree85d2e08362d0c4ada8c5a8e37defafd1e9215ad1 /src/include/device
parent475978875da1799f48c56bbdd689031d25c1a154 (diff)
src/{device,include}: Use PNP_IDX_EN instead of magic number
Change-Id: I68590605e261ecaace9f3cea28cfa6ec3b913a8a Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44835 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/pnp_ops.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/device/pnp_ops.h b/src/include/device/pnp_ops.h
index 0cfdd61c27..18b35befcd 100644
--- a/src/include/device/pnp_ops.h
+++ b/src/include/device/pnp_ops.h
@@ -6,6 +6,7 @@
#include <stdint.h>
#include <arch/io.h>
#include <device/pnp.h>
+#include <device/pnp_def.h>
#include <device/pnp_type.h>
#if ENV_PNP_SIMPLE_DEVICE
@@ -32,13 +33,13 @@ void pnp_set_logical_device(pnp_devfn_t dev)
static __always_inline
void pnp_set_enable(pnp_devfn_t dev, int enable)
{
- pnp_write_config(dev, 0x30, enable?0x1:0x0);
+ pnp_write_config(dev, PNP_IDX_EN, enable?0x1:0x0);
}
static __always_inline
int pnp_read_enable(pnp_devfn_t dev)
{
- return !!pnp_read_config(dev, 0x30);
+ return !!pnp_read_config(dev, PNP_IDX_EN);
}
static __always_inline