mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-04 16:25:18 +00:00
Fix 47B27x device ID.
Do not hardcode ports in exit_superio(). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2331 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1464,7 +1464,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
datareg => 0x2f,
|
||||
enter => [0x55],
|
||||
devidreg => 0x20,
|
||||
devid => 0x59,
|
||||
devid => 0x51,
|
||||
logdevreg => 0x07,
|
||||
logdev => 0x0a,
|
||||
actreg => 0x30,
|
||||
@@ -2478,20 +2478,19 @@ sub scan_isa_bus
|
||||
|
||||
sub exit_superio
|
||||
{
|
||||
# If an exit sequence exists, use it
|
||||
if (defined($_[0])) {
|
||||
my $chip = shift;
|
||||
if (defined ($$chip{exit})) {
|
||||
foreach my $byte (@{$$chip{exit}}) {
|
||||
outb(0x2e, $byte);
|
||||
}
|
||||
return;
|
||||
my ($chip, $success) = @_;
|
||||
|
||||
# If detection succeeded and an exit sequence exists, use it
|
||||
if ($success && defined ($$chip{exit})) {
|
||||
foreach my $byte (@{$$chip{exit}}) {
|
||||
outb($$chip{addrreg}, $byte);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
# Else return to "Wait For Key" state (PNP-ISA spec)
|
||||
outb(0x2e, 0x02);
|
||||
outb(0x2f, 0x02);
|
||||
outb($$chip{addrreg}, 0x02);
|
||||
outb($$chip{datareg}, 0x02);
|
||||
}
|
||||
|
||||
sub scan_superio
|
||||
@@ -2521,7 +2520,7 @@ sub scan_superio
|
||||
$val = inb($$chip{datareg});
|
||||
if(!($val & $$chip{actmask})) {
|
||||
print " but not activated, module may not find\n";
|
||||
exit_superio($chip);
|
||||
exit_superio($chip, 1);
|
||||
next;
|
||||
}
|
||||
}
|
||||
@@ -2532,7 +2531,7 @@ sub scan_superio
|
||||
$addr = ($addr << 8) | inb($$chip{datareg});
|
||||
if($addr == 0) {
|
||||
print " but not activated, module may not find\n";
|
||||
exit_superio($chip);
|
||||
exit_superio($chip, 1);
|
||||
next;
|
||||
}
|
||||
printf " found at address 0x%04x\n", $addr;
|
||||
@@ -2542,14 +2541,14 @@ sub scan_superio
|
||||
};
|
||||
add_isa_to_chips_detected $$chip{alias_detect},$$chip{driver},
|
||||
$new_hash;
|
||||
exit_superio($chip);
|
||||
exit_superio($chip, 1);
|
||||
} else {
|
||||
if($val == 0xff || $val == 0xffff) {
|
||||
print " Failed!\n";
|
||||
} else {
|
||||
printf " Failed! (0x%02x)\n", $val;
|
||||
}
|
||||
exit_superio();
|
||||
exit_superio($chip, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user