Changeset 4128
- Timestamp:
- 09/01/06 18:45:50 (7 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/prog/detect/sensors-detect (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/prog/detect/sensors-detect
r4124 r4128 52 52 $revision = '$Revision$ ($Date$)'; 53 53 $revision =~ s/\$\w+: (.*?) \$/$1/g; 54 $revision =~ s/ \([^()]*\)//; 54 55 55 56 # This is the list of SMBus or I2C adapters we recognize by their PCI … … 1406 1407 }, 1407 1408 { 1408 name => "VIA TechnologiesVT82C686 Integrated Sensors",1409 name => "VIA VT82C686 Integrated Sensors", 1409 1410 driver => "via686a", 1410 1411 isa_addrs => [ 0 ], … … 1412 1413 }, 1413 1414 { 1414 name => "VIA TechnologiesVT8231 Integrated Sensors",1415 name => "VIA VT8231 Integrated Sensors", 1415 1416 driver => "vt8231", 1416 1417 isa_addrs => [ 0 ], … … 1651 1652 [ 1652 1653 { 1653 name => "ITE 8702F Super IO Sensors",1654 name => "ITE IT8702F Super IO Sensors", 1654 1655 driver => "to-be-written", 1655 1656 devid => 0x8702, … … 1657 1658 }, 1658 1659 { 1659 name => "ITE 8705F Super IO Sensors",1660 name => "ITE IT8705F Super IO Sensors", 1660 1661 driver => "it87", 1661 1662 devid => 0x8705, … … 1663 1664 }, 1664 1665 { 1665 name => "ITE 8712F Super IO Sensors",1666 name => "ITE IT8712F Super IO Sensors", 1666 1667 driver => "it87", 1667 1668 devid => 0x8712, … … 1813 1814 [ 1814 1815 { 1815 name => "SMSC 47B27x Super IO Fan Sensors",1816 name => "SMSC LPC47B27x Super IO Fan Sensors", 1816 1817 driver => "smsc47m1", 1817 1818 devid => 0x51, … … 1819 1820 }, 1820 1821 { 1821 name => "SMSC 47M10x/13x Super IO Fan Sensors",1822 name => "SMSC LPC47M10x/13x Super IO Fan Sensors", 1822 1823 driver => "smsc47m1", 1823 1824 devid => 0x59, … … 1825 1826 }, 1826 1827 { 1827 name => "SMSC 47M14x Super IO Fan Sensors",1828 name => "SMSC LPC47M14x Super IO Fan Sensors", 1828 1829 driver => "smsc47m1", 1829 1830 devid => 0x5f, … … 1831 1832 }, 1832 1833 { 1833 name => "SMSC 47M15x/192/997 Super IO Fan Sensors",1834 name => "SMSC LPC47M15x/192/997 Super IO Fan Sensors", 1834 1835 driver => "smsc47m1", 1835 1836 devid => 0x60, … … 1837 1838 }, 1838 1839 { 1839 name => "SMSC 47S42x Super IO Fan Sensors",1840 name => "SMSC LPC47S42x Super IO Fan Sensors", 1840 1841 driver => "to-be-written", 1841 1842 devid => 0x57, … … 1843 1844 }, 1844 1845 { 1845 name => "SMSC 47S45x Super IO Fan Sensors",1846 name => "SMSC LPC47S45x Super IO Fan Sensors", 1846 1847 driver => "to-be-written", 1847 1848 devid => 0x62, … … 1849 1850 }, 1850 1851 { 1851 name => "SMSC 47M172 Super IO",1852 name => "SMSC LPC47M172 Super IO", 1852 1853 driver => "not-a-sensor", 1853 1854 devid => 0x14, … … 1882 1883 [ 1883 1884 { 1884 name => "V T1211 Super IO Sensors",1885 name => "VIA VT1211 Super IO Sensors", 1885 1886 driver => "vt1211", 1886 1887 devid => 0x3c, … … 2841 2842 foreach $chip (@chip_ids) { 2842 2843 if (exists $chip->{i2c_addrs} and contains $addr, @{$chip->{i2c_addrs}}) { 2843 print "Probing for `$chip->{name}'... ";2844 printf("\%-60s", sprintf("Probing for `\%s'... ", $chip->{name})); 2844 2845 if (($conf,@chips) = &{$chip->{i2c_detect}} (\*FILE ,$addr)) { 2845 2846 print "Success!\n", … … 2866 2867 add_i2c_to_chips_detected $chip->{driver}, $new_hash; 2867 2868 } else { 2868 print " Failed!\n";2869 print "No\n"; 2869 2870 } 2870 2871 } … … 2878 2879 foreach $chip (@chip_ids) { 2879 2880 next if not exists $chip->{isa_addrs} or not exists $chip->{isa_detect}; 2880 print "Probing for `$chip->{name}'\n";2881 2881 foreach $addr (@{$chip->{isa_addrs}}) { 2882 if ($addr) { 2883 printf " Trying address 0x%04x... ", $addr; 2884 } else { 2885 print " Trying general detect... "; 2886 } 2882 printf("\%-60s", sprintf("Probing for `\%s'\%s... ", $chip->{name}, 2883 $addr ? sprintf(" at 0x\%x", $addr) : '')); 2887 2884 $conf = &{$chip->{isa_detect}} ($addr); 2888 print(" Failed!\n"), next if not defined $conf;2885 print("No\n"), next if not defined $conf; 2889 2886 print "Success!\n"; 2890 2887 printf " (confidence %d, driver `%s')\n", $conf, $chip->{driver}; … … 2930 2927 { 2931 2928 my ($addrreg, $datareg) = @_; 2932 my ($val, $addr );2929 my ($val, $addr, $name); 2933 2930 2934 2931 my %superio = ( … … 2940 2937 ); 2941 2938 2939 printf("Probing for Super-I/O at 0x\%x/0x\%x\n", $addrreg, $datareg); 2940 2942 2941 FAMILY: 2943 2942 foreach my $family (@superio_ids) { … … 2947 2946 } 2948 2947 foreach my $chip (@{$family->{chips}}) { 2949 print "Probing for `$chip->{name}'\n"; 2948 $name = $chip->{name}; 2949 $name =~ s/ Super IO//; 2950 printf("\%-60s", sprintf("Probing for `\%s'... ", $name)); 2950 2951 # check the device ID 2951 2952 outb($addrreg, $superio{devidreg}); 2952 2953 $val = inb($datareg); 2953 2954 if ($val == 0x00 || $val == 0xff) { 2954 print " Failed! (skipping family)\n";2955 print "No\n"; 2955 2956 exit_superio($addrreg, $datareg, $family, 0); 2956 2957 next FAMILY; … … 2961 2962 } 2962 2963 if (($val & ($chip->{devid_mask} || 0xffff)) != $chip->{devid}) { 2963 printf " Failed!(0x%0*x)\n", $chip->{devid}>0xff ? 4 : 2, $val;2964 printf "No (0x%0*x)\n", $chip->{devid}>0xff ? 4 : 2, $val; 2964 2965 next; 2965 2966 } 2966 print " Success...";2967 print "Success!\n"; 2967 2968 # does it have hardware monitoring capabilities 2968 2969 if (!exists $chip->{driver}) { 2969 print " (no information available)\n";2970 print " (no information available)\n"; 2970 2971 next; 2971 2972 } 2972 2973 if($chip->{driver} eq "not-a-sensor") { 2973 print " (no hardware monitoring capabilities)\n";2974 print " (no hardware monitoring capabilities)\n"; 2974 2975 next; 2975 2976 } … … 2981 2982 $val = inb($datareg); 2982 2983 if(!($val & $superio{actmask})) { 2983 print " but not activated\n";2984 print " (but not activated)\n"; 2984 2985 next; 2985 2986 } … … 2990 2991 $addr = ($addr << 8) | inb($datareg); 2991 2992 if($addr == 0) { 2992 print " but no address specified\n";2993 print " (but no address specified)\n"; 2993 2994 next; 2994 2995 } 2995 printf " found at address 0x%04x\n", $addr;2996 printf " (address 0x\%x, driver `%s')\n", $addr, $chip->{driver}; 2996 2997 my $new_hash = { conf => 9, 2997 2998 isa_addr => $addr, … … 5340 5341 5341 5342 print "We are now going to do the I2C/SMBus adapter probings. Some chips may\n", 5342 "be double detected; we choose the one with the highest confidence value\n",5343 " in that case.\n",5344 "If you found that the adapter hung after probing a certain address, you\n",5345 " can specify that address to remain unprobed.\n";5343 "be double detected; we choose the one with the highest confidence\n", 5344 "value in that case.\n", 5345 "If you found that the adapter hung after probing a certain address,\n", 5346 "you can specify that address to remain unprobed.\n"; 5346 5347 5347 5348 my ($inp,@not_to_scan,$inp2); … … 5374 5375 5375 5376 print "Some chips are also accessible through the ISA I/O ports. We have to\n". 5376 "write to arbitrary I/O ports to do this. This is usually safe though.\n".5377 "write to arbitrary I/O ports to probe them. This is usually safe though.\n". 5377 5378 "Yes, you do have ISA I/O ports even if you do not have any ISA slots!\n"; 5378 5379 print "Do you want to scan the ISA I/O ports? (YES/no): "; … … 5385 5386 5386 5387 print "Some Super I/O chips may also contain sensors. We have to write to\n". 5387 "standard I/O ports to do this. This is usually safe.\n";5388 "standard I/O ports to probe them. This is usually safe.\n"; 5388 5389 print "Do you want to scan for Super I/O sensors? (YES/no): "; 5389 5390 unless (<STDIN> =~ /^\s*n/i) { 5390 5391 initialize_ioports(); 5391 5392 scan_superio(0x2e, 0x2f); 5392 print "\nDo you want to scan for secondary Super I/O sensors? (YES/no): "; 5393 unless (<STDIN> =~ /^\s*n/i) { 5394 scan_superio(0x4e, 0x4f); 5395 } 5393 scan_superio(0x4e, 0x4f); 5396 5394 close_ioports(); 5397 5395 }
