HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45327 )
Change subject: device/pnp_device.c: Use 'PNP_IDX_EN' instead of magic number ......................................................................
device/pnp_device.c: Use 'PNP_IDX_EN' instead of magic number
Change-Id: I9c3050698f66e91e3b57c27c1755b47520f245ab Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/device/pnp_device.c 1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/45327/1
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c index cd7adf3..9fa032e 100644 --- a/src/device/pnp_device.c +++ b/src/device/pnp_device.c @@ -5,6 +5,7 @@ #include <arch/io.h> #include <device/device.h> #include <device/pnp.h> +#include <device/pnp_def.h>
/* PNP config mode wrappers */
@@ -56,7 +57,7 @@ { u8 tmp, bitpos;
- tmp = pnp_read_config(dev, 0x30); + tmp = pnp_read_config(dev, PNP_IDX_EN);
/* Handle virtual devices, which share the same LDN register. */ bitpos = (dev->path.pnp.device >> 8) & 0x7; @@ -66,14 +67,14 @@ else tmp &= ~(1 << bitpos);
- pnp_write_config(dev, 0x30, tmp); + pnp_write_config(dev, PNP_IDX_EN, tmp); }
int pnp_read_enable(struct device *dev) { u8 tmp, bitpos;
- tmp = pnp_read_config(dev, 0x30); + tmp = pnp_read_config(dev, PNP_IDX_EN);
/* Handle virtual devices, which share the same LDN register. */ bitpos = (dev->path.pnp.device >> 8) & 0x7;