diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-02-06 21:55:36 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-03-15 11:54:18 -0400 |
commit | 25cdd99deb927c2753759ead21710303c499a4e0 (patch) | |
tree | cec61ccd6659b31070a26053ffe4a9dbf2e591d0 | |
parent | d2a14ea51a4d7e506b2ebac2c57a32ad577ed693 (diff) |
hwmon: (nct6775) Enable auxiliary fan monitoring on ASRock Z77 Pro4-M
Auxiliary fan monitoring is not enabled on ASRock Z77 Pro4-M
with BIOS version 2.00 if booted in UEFI Ultra-FastBoot mode.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/nct6775.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 0445a52379e7..4fcb48103299 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/err.h> | 57 | #include <linux/err.h> |
58 | #include <linux/mutex.h> | 58 | #include <linux/mutex.h> |
59 | #include <linux/acpi.h> | 59 | #include <linux/acpi.h> |
60 | #include <linux/dmi.h> | ||
60 | #include <linux/io.h> | 61 | #include <linux/io.h> |
61 | #include "lm75.h" | 62 | #include "lm75.h" |
62 | 63 | ||
@@ -3199,6 +3200,26 @@ nct6775_check_fan_inputs(struct nct6775_data *data) | |||
3199 | pwm6pin = false; | 3200 | pwm6pin = false; |
3200 | } else if (data->kind == nct6776) { | 3201 | } else if (data->kind == nct6776) { |
3201 | bool gpok = superio_inb(sioreg, 0x27) & 0x80; | 3202 | bool gpok = superio_inb(sioreg, 0x27) & 0x80; |
3203 | const char *board_vendor, *board_name; | ||
3204 | |||
3205 | board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); | ||
3206 | board_name = dmi_get_system_info(DMI_BOARD_NAME); | ||
3207 | |||
3208 | if (board_name && board_vendor && | ||
3209 | !strcmp(board_vendor, "ASRock")) { | ||
3210 | /* | ||
3211 | * Auxiliary fan monitoring is not enabled on ASRock | ||
3212 | * Z77 Pro4-M if booted in UEFI Ultra-FastBoot mode. | ||
3213 | * Observed with BIOS version 2.00. | ||
3214 | */ | ||
3215 | if (!strcmp(board_name, "Z77 Pro4-M")) { | ||
3216 | if ((data->sio_reg_enable & 0xe0) != 0xe0) { | ||
3217 | data->sio_reg_enable |= 0xe0; | ||
3218 | superio_outb(sioreg, SIO_REG_ENABLE, | ||
3219 | data->sio_reg_enable); | ||
3220 | } | ||
3221 | } | ||
3222 | } | ||
3202 | 3223 | ||
3203 | if (data->sio_reg_enable & 0x80) | 3224 | if (data->sio_reg_enable & 0x80) |
3204 | fan3pin = gpok; | 3225 | fan3pin = gpok; |