Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35862 )
Change subject: superio/winbond/w83627*: use hwm5_conf.h for HWM setup ......................................................................
superio/winbond/w83627*: use hwm5_conf.h for HWM setup
Change-Id: Id78042606f02e02035dc917d162d0c98c9de38a4 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/superio/winbond/w83627ehg/superio.c M src/superio/winbond/w83627hf/superio.c 2 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/35862/1
diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c index 88fbc31..85e3250 100644 --- a/src/superio/winbond/w83627ehg/superio.c +++ b/src/superio/winbond/w83627ehg/superio.c @@ -20,6 +20,7 @@ #include <device/device.h> #include <device/pnp.h> #include <superio/conf_mode.h> +#include <superio/hwm5_conf.h> #include <console/console.h> #include <pc80/keyboard.h> #include <pc80/mc146818rtc.h> @@ -65,12 +66,12 @@
for (i = 0; i < ARRAY_SIZE(hwm_reg_values); i += 3) { reg = hwm_reg_values[i]; - value = pnp_read_index(base, reg); + value = pnp_read_hwm5_index(base, reg); value &= 0xff & (~(hwm_reg_values[i + 1])); value |= 0xff & hwm_reg_values[i + 2]; printk(BIOS_DEBUG, "base = 0x%04x, reg = 0x%02x, " "value = 0x%02x\n", base, reg, value); - pnp_write_index(base, reg, value); + pnp_write_hwm5_index(base, reg, value); } }
@@ -87,8 +88,7 @@ break; case W83627EHG_HWM: res0 = find_resource(dev, PNP_IDX_IO0); -#define HWM_INDEX_PORT 5 - init_hwm(res0->base + HWM_INDEX_PORT); + init_hwm(res0->base); break; case W83627EHG_ACPI: init_acpi(dev); diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c index 318eaa4..54120fb 100644 --- a/src/superio/winbond/w83627hf/superio.c +++ b/src/superio/winbond/w83627hf/superio.c @@ -20,6 +20,7 @@ #include <device/device.h> #include <device/pnp.h> #include <superio/conf_mode.h> +#include <superio/hwm5_conf.h> #include <console/console.h> #include <pc80/keyboard.h> #include <pc80/mc146818rtc.h> @@ -72,12 +73,12 @@
for (i = 0; i < ARRAY_SIZE(hwm_reg_values); i += 3) { reg = hwm_reg_values[i]; - value = pnp_read_index(base, reg); + value = pnp_read_hwm5_index(base, reg); value &= 0xff & hwm_reg_values[i + 1]; value |= 0xff & hwm_reg_values[i + 2]; printk(BIOS_DEBUG, "base = 0x%04x, reg = 0x%02x, " "value = 0x%02x\n", base, reg, value); - pnp_write_index(base, reg, value); + pnp_write_hwm5_index(base, reg, value); } }
@@ -94,8 +95,7 @@ break; case W83627HF_HWM: res0 = find_resource(dev, PNP_IDX_IO0); -#define HWM_INDEX_PORT 5 - init_hwm(res0->base + HWM_INDEX_PORT); + init_hwm(res0->base); break; case W83627HF_ACPI: init_acpi(dev);
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35862 )
Change subject: superio/winbond/w83627*: use hwm5_conf.h for HWM setup ......................................................................
Patch Set 1: Code-Review+2
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35862 )
Change subject: superio/winbond/w83627*: use hwm5_conf.h for HWM setup ......................................................................
superio/winbond/w83627*: use hwm5_conf.h for HWM setup
Change-Id: Id78042606f02e02035dc917d162d0c98c9de38a4 Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/35862 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr --- M src/superio/winbond/w83627ehg/superio.c M src/superio/winbond/w83627hf/superio.c 2 files changed, 8 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, approved
diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c index 88fbc31..85e3250 100644 --- a/src/superio/winbond/w83627ehg/superio.c +++ b/src/superio/winbond/w83627ehg/superio.c @@ -20,6 +20,7 @@ #include <device/device.h> #include <device/pnp.h> #include <superio/conf_mode.h> +#include <superio/hwm5_conf.h> #include <console/console.h> #include <pc80/keyboard.h> #include <pc80/mc146818rtc.h> @@ -65,12 +66,12 @@
for (i = 0; i < ARRAY_SIZE(hwm_reg_values); i += 3) { reg = hwm_reg_values[i]; - value = pnp_read_index(base, reg); + value = pnp_read_hwm5_index(base, reg); value &= 0xff & (~(hwm_reg_values[i + 1])); value |= 0xff & hwm_reg_values[i + 2]; printk(BIOS_DEBUG, "base = 0x%04x, reg = 0x%02x, " "value = 0x%02x\n", base, reg, value); - pnp_write_index(base, reg, value); + pnp_write_hwm5_index(base, reg, value); } }
@@ -87,8 +88,7 @@ break; case W83627EHG_HWM: res0 = find_resource(dev, PNP_IDX_IO0); -#define HWM_INDEX_PORT 5 - init_hwm(res0->base + HWM_INDEX_PORT); + init_hwm(res0->base); break; case W83627EHG_ACPI: init_acpi(dev); diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c index 318eaa4..54120fb 100644 --- a/src/superio/winbond/w83627hf/superio.c +++ b/src/superio/winbond/w83627hf/superio.c @@ -20,6 +20,7 @@ #include <device/device.h> #include <device/pnp.h> #include <superio/conf_mode.h> +#include <superio/hwm5_conf.h> #include <console/console.h> #include <pc80/keyboard.h> #include <pc80/mc146818rtc.h> @@ -72,12 +73,12 @@
for (i = 0; i < ARRAY_SIZE(hwm_reg_values); i += 3) { reg = hwm_reg_values[i]; - value = pnp_read_index(base, reg); + value = pnp_read_hwm5_index(base, reg); value &= 0xff & hwm_reg_values[i + 1]; value |= 0xff & hwm_reg_values[i + 2]; printk(BIOS_DEBUG, "base = 0x%04x, reg = 0x%02x, " "value = 0x%02x\n", base, reg, value); - pnp_write_index(base, reg, value); + pnp_write_hwm5_index(base, reg, value); } }
@@ -94,8 +95,7 @@ break; case W83627HF_HWM: res0 = find_resource(dev, PNP_IDX_IO0); -#define HWM_INDEX_PORT 5 - init_hwm(res0->base + HWM_INDEX_PORT); + init_hwm(res0->base); break; case W83627HF_ACPI: init_acpi(dev);