From 35103fd961bb5fed318dd3b842582648541586e3 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Sun, 15 Dec 2019 12:11:44 +0100 Subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function Change-Id: I169b16c99a864ecff54112bcc073f2c141c2009f Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/37946 Tested-by: build bot (Jenkins) Reviewed-by: HAOUAS Elyes Reviewed-by: Angel Pons --- src/mainboard/kontron/986lcd-m/Kconfig | 1 + src/mainboard/kontron/986lcd-m/mainboard.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mainboard/kontron/986lcd-m') diff --git a/src/mainboard/kontron/986lcd-m/Kconfig b/src/mainboard/kontron/986lcd-m/Kconfig index 1ccdf1a185..dfc7c3cfd2 100644 --- a/src/mainboard/kontron/986lcd-m/Kconfig +++ b/src/mainboard/kontron/986lcd-m/Kconfig @@ -8,6 +8,7 @@ config BOARD_SPECIFIC_OPTIONS select CHECK_SLFRCS_ON_RESUME select SOUTHBRIDGE_INTEL_I82801GX select SUPERIO_WINBOND_W83627THG + select SUPERIO_NUVOTON_COMMON_HWM # Nuvoton is a Winbond spin-off select HAVE_ACPI_TABLES select HAVE_PIRQ_TABLE select HAVE_MP_TABLE diff --git a/src/mainboard/kontron/986lcd-m/mainboard.c b/src/mainboard/kontron/986lcd-m/mainboard.c index fcf43e145e..cc2e32bf29 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -20,6 +20,7 @@ #include #include #include +#include /* Hardware Monitor */ @@ -74,16 +75,16 @@ static void hwm_setup(void) sysfan_speed = FAN_SPEED_5625; get_option(&sysfan_speed, "sysfan_speed"); - pnp_write_hwm5_index(hwm_base, 0x4e, 0); + nuvoton_hwm_select_bank(hwm_base, 0); pnp_write_hwm5_index(hwm_base, 0x59, 0x20); /* Diode Selection */ pnp_write_hwm5_index(hwm_base, 0x5d, 0x0f); /* All Sensors Diode, not Thermistor */ - pnp_write_hwm5_index(hwm_base, 0x4e, 4); + nuvoton_hwm_select_bank(hwm_base, 4); pnp_write_hwm5_index(hwm_base, 0x54, 0xf1); /* SYSTIN temperature offset */ pnp_write_hwm5_index(hwm_base, 0x55, 0x19); /* CPUTIN temperature offset */ pnp_write_hwm5_index(hwm_base, 0x56, 0xfc); /* AUXTIN temperature offset */ - pnp_write_hwm5_index(hwm_base, 0x4e, 0x80); /* Default */ + nuvoton_hwm_select_bank(hwm_base, 0x80); /* Default */ u8 fan_config = 0; /* 00 FANOUT is Manual Mode */ -- cgit v1.2.3