diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-25 06:16:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-25 06:16:51 -0400 |
commit | d02859ecb321c8c0f74cb9bbe3f51a59e58822b0 (patch) | |
tree | 05dd5bdc55081c0a90bf0afc35c07d0d6e25d015 /drivers/hwmon/abituguru3.c | |
parent | a987b16cc6123af2c9414032701bab5f73c54c89 (diff) | |
parent | 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff) |
Merge commit 'v2.6.26-rc8' into x86/xen
Conflicts:
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/hwmon/abituguru3.c')
-rw-r--r-- | drivers/hwmon/abituguru3.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index ed33fddc4dee..f00f497b9ca9 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/hwmon.h> | 31 | #include <linux/hwmon.h> |
32 | #include <linux/hwmon-sysfs.h> | 32 | #include <linux/hwmon-sysfs.h> |
33 | #include <linux/dmi.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | 35 | ||
35 | /* uGuru3 bank addresses */ | 36 | /* uGuru3 bank addresses */ |
@@ -323,7 +324,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { | |||
323 | { "AUX1 Fan", 36, 2, 60, 1, 0 }, | 324 | { "AUX1 Fan", 36, 2, 60, 1, 0 }, |
324 | { NULL, 0, 0, 0, 0, 0 } } | 325 | { NULL, 0, 0, 0, 0, 0 } } |
325 | }, | 326 | }, |
326 | { 0x0013, "unknown", { | 327 | { 0x0013, "Abit AW8D", { |
327 | { "CPU Core", 0, 0, 10, 1, 0 }, | 328 | { "CPU Core", 0, 0, 10, 1, 0 }, |
328 | { "DDR", 1, 0, 10, 1, 0 }, | 329 | { "DDR", 1, 0, 10, 1, 0 }, |
329 | { "DDR VTT", 2, 0, 10, 1, 0 }, | 330 | { "DDR VTT", 2, 0, 10, 1, 0 }, |
@@ -349,6 +350,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = { | |||
349 | { "AUX2 Fan", 36, 2, 60, 1, 0 }, | 350 | { "AUX2 Fan", 36, 2, 60, 1, 0 }, |
350 | { "AUX3 Fan", 37, 2, 60, 1, 0 }, | 351 | { "AUX3 Fan", 37, 2, 60, 1, 0 }, |
351 | { "AUX4 Fan", 38, 2, 60, 1, 0 }, | 352 | { "AUX4 Fan", 38, 2, 60, 1, 0 }, |
353 | { "AUX5 Fan", 39, 2, 60, 1, 0 }, | ||
352 | { NULL, 0, 0, 0, 0, 0 } } | 354 | { NULL, 0, 0, 0, 0, 0 } } |
353 | }, | 355 | }, |
354 | { 0x0014, "Abit AB9 Pro", { | 356 | { 0x0014, "Abit AB9 Pro", { |
@@ -1111,11 +1113,12 @@ static int __init abituguru3_detect(void) | |||
1111 | { | 1113 | { |
1112 | /* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or | 1114 | /* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or |
1113 | 0x08 at DATA and 0xAC at CMD. Sometimes the uGuru3 will hold 0x05 | 1115 | 0x08 at DATA and 0xAC at CMD. Sometimes the uGuru3 will hold 0x05 |
1114 | at CMD instead, why is unknown. So we test for 0x05 too. */ | 1116 | or 0x55 at CMD instead, why is unknown. */ |
1115 | u8 data_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_DATA); | 1117 | u8 data_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_DATA); |
1116 | u8 cmd_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_CMD); | 1118 | u8 cmd_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_CMD); |
1117 | if (((data_val == 0x00) || (data_val == 0x08)) && | 1119 | if (((data_val == 0x00) || (data_val == 0x08)) && |
1118 | ((cmd_val == 0xAC) || (cmd_val == 0x05))) | 1120 | ((cmd_val == 0xAC) || (cmd_val == 0x05) || |
1121 | (cmd_val == 0x55))) | ||
1119 | return ABIT_UGURU3_BASE; | 1122 | return ABIT_UGURU3_BASE; |
1120 | 1123 | ||
1121 | ABIT_UGURU3_DEBUG("no Abit uGuru3 found, data = 0x%02X, cmd = " | 1124 | ABIT_UGURU3_DEBUG("no Abit uGuru3 found, data = 0x%02X, cmd = " |
@@ -1138,6 +1141,15 @@ static int __init abituguru3_init(void) | |||
1138 | int address, err; | 1141 | int address, err; |
1139 | struct resource res = { .flags = IORESOURCE_IO }; | 1142 | struct resource res = { .flags = IORESOURCE_IO }; |
1140 | 1143 | ||
1144 | #ifdef CONFIG_DMI | ||
1145 | const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); | ||
1146 | |||
1147 | /* safety check, refuse to load on non Abit motherboards */ | ||
1148 | if (!force && (!board_vendor || | ||
1149 | strcmp(board_vendor, "http://www.abit.com.tw/"))) | ||
1150 | return -ENODEV; | ||
1151 | #endif | ||
1152 | |||
1141 | address = abituguru3_detect(); | 1153 | address = abituguru3_detect(); |
1142 | if (address < 0) | 1154 | if (address < 0) |
1143 | return address; | 1155 | return address; |