Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
kontron/986lcd-m: use common winbond/nuvoton HWM bank select function
Change-Id: I169b16c99a864ecff54112bcc073f2c141c2009f Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/mainboard/kontron/986lcd-m/Kconfig M src/mainboard/kontron/986lcd-m/mainboard.c 2 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/37946/1
diff --git a/src/mainboard/kontron/986lcd-m/Kconfig b/src/mainboard/kontron/986lcd-m/Kconfig index 1ccdf1a..dfc7c3c 100644 --- a/src/mainboard/kontron/986lcd-m/Kconfig +++ b/src/mainboard/kontron/986lcd-m/Kconfig @@ -8,6 +8,7 @@ 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 b3e8427..070572d 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -21,6 +21,7 @@ #include <drivers/intel/gma/int15.h> #include <pc80/mc146818rtc.h> #include <superio/hwm5_conf.h> +#include <superio/nuvoton/common/hwm.h>
/* Hardware Monitor */
@@ -75,16 +76,16 @@ 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 */
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... File src/mainboard/kontron/986lcd-m/Kconfig:
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... PS1, Line 11: select SUPERIO_NUVOTON_COMMON_HWM can't we move this to 'src/superio/winbond/w83627thg/Kconfig' ?
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... File src/mainboard/kontron/986lcd-m/Kconfig:
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... PS1, Line 11: select SUPERIO_NUVOTON_COMMON_HWM
can't we move this to 'src/superio/winbond/w83627thg/Kconfig' ?
I selected this in the mainboard's Kconfig file and not in the SIO's Kconfig file, since the SIO code doesn't use the function that gets linked by selecting this symbol, but the mainboard code does. If the SIO code used this, then the SIO's Kconfig should select this, but this isn't the case here (yet?)
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... File src/mainboard/kontron/986lcd-m/Kconfig:
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... PS1, Line 11: select SUPERIO_NUVOTON_COMMON_HWM
I selected this in the mainboard's Kconfig file and not in the SIO's Kconfig file, since the SIO cod […]
I agree with Felix
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... File src/mainboard/kontron/986lcd-m/Kconfig:
https://review.coreboot.org/c/coreboot/+/37946/1/src/mainboard/kontron/986lc... PS1, Line 11: select SUPERIO_NUVOTON_COMMON_HWM
I agree with Felix
i'll keep this in here for now
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37946 )
Change subject: kontron/986lcd-m: use common winbond/nuvoton HWM bank select function ......................................................................
kontron/986lcd-m: use common winbond/nuvoton HWM bank select function
Change-Id: I169b16c99a864ecff54112bcc073f2c141c2009f Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/37946 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/kontron/986lcd-m/Kconfig M src/mainboard/kontron/986lcd-m/mainboard.c 2 files changed, 5 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/kontron/986lcd-m/Kconfig b/src/mainboard/kontron/986lcd-m/Kconfig index 1ccdf1a..dfc7c3c 100644 --- a/src/mainboard/kontron/986lcd-m/Kconfig +++ b/src/mainboard/kontron/986lcd-m/Kconfig @@ -8,6 +8,7 @@ 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 fcf43e1..cc2e32b 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -20,6 +20,7 @@ #include <drivers/intel/gma/int15.h> #include <pc80/mc146818rtc.h> #include <superio/hwm5_conf.h> +#include <superio/nuvoton/common/hwm.h>
/* Hardware Monitor */
@@ -74,16 +75,16 @@ 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 */