Changeset 2323

Show
Ignore:
Timestamp:
02/28/04 23:00:35 (9 years ago)
Author:
khali
Message:

Fix broken superio exit sequence handling.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/detect/sensors-detect

    r2303 r2323  
    13001300# Each entry must have the following fields: 
    13011301#  name: The full chip name 
    1302 #  driver: The driver name (without .o extension). Put in something like 
    1303 #      "Unwritten: <drivername>" if it is not yet available. 
     1302#  driver: The driver name (without .o extension). Put in 
     1303#      "to-be-written" if it is not yet available. 
    13041304#  addrreg: The address register 
    13051305#  datareg: The data register 
     
    13121312#  actmask (optional): The activation bit in the activation register 
    13131313#  basereg: The I/O base register within the logical device 
    1314 #  exitseq: Sequence of addr,val pairs which exits config modem 
     1314#  exitseq: Sequence of addr,val pairs which exits config mode 
    13151315#  alias_detect (optional): For chips which can be both on the ISA and the 
    13161316#      I2C bus, a function which detectes whether two entries are the same. 
     
    13721372        driver => "smsc47m1", 
    13731373        addrreg => 0x2e, 
    1374         exitreg => 0x2e, 
    13751374        datareg => 0x2f, 
    13761375        enter => [0x55], 
     
    13881387        driver => "smsc47m1", 
    13891388        addrreg => 0x2e, 
    1390         exitreg => 0x2e, 
    13911389        datareg => 0x2f, 
    13921390        enter => [0x55], 
     
    14041402        driver => "vt1211", 
    14051403        addrreg => 0x2e, 
    1406         exitreg => 0x2e, 
    14071404        datareg => 0x2f, 
    14081405        enter => [0x87, 0x87], 
     
    14201417        driver => "w83627hf", 
    14211418        addrreg => 0x2e, 
    1422         exitreg => 0x2e, 
    14231419        datareg => 0x2f, 
    14241420        enter => [0x87, 0x87], 
     
    14361432        driver => "w83627hf", 
    14371433        addrreg => 0x2e, 
    1438         exitreg => 0x2e, 
    14391434        datareg => 0x2f, 
    14401435        enter => [0x87, 0x87], 
     
    14461441        actmask => 0x01, 
    14471442        basereg => 0x60, 
    1448         exit => 0xaa, 
     1443        exitseq => [0x2e, 0xaa], 
    14491444     },  
    14501445     { 
     
    14521447        driver => "w83627hf", 
    14531448        addrreg => 0x2e, 
    1454         exitreg => 0x2e, 
    14551449        datareg => 0x2f, 
    14561450        enter => [0x87, 0x87], 
     
    14681462        driver => "w83627hf", 
    14691463        addrreg => 0x2e, 
    1470         exitreg => 0x2e, 
    14711464        datareg => 0x2f, 
    14721465        enter => [0x87, 0x87], 
     
    14781471        actmask => 0x01, 
    14791472        basereg => 0x60, 
    1480         exit => 0xaa, 
     1473        exitseq => [0x2e, 0xaa], 
    14811474     },  
    14821475     { 
     
    14841477        driver => "to-be-written", 
    14851478        addrreg => 0x2e, 
    1486         exitreg => 0x2e, 
    14871479        datareg => 0x2f, 
    14881480        enter => [0x87, 0x87], 
     
    23652357} 
    23662358 
     2359sub exit_superio 
     2360{ 
     2361  my $chip = shift; 
     2362  my $addr;   
     2363 
     2364  while (defined($addr = shift(@{$$chip{exitseq}}))) { 
     2365    outb($addr, shift(@{$$chip{exitseq}})); 
     2366  } 
     2367} 
     2368 
    23672369sub scan_superio 
    23682370{ 
     
    23922394        if(!($val & $$chip{actmask})) { 
    23932395          print " but not activated, module may not find\n"; 
    2394           outb($$chip{exitreg}, $$chip{exit}); 
     2396          exit_superio($chip); 
    23952397          next; 
    23962398        } 
     
    24032405      if($addr == 0) { 
    24042406        print " but not activated, module may not find\n"; 
    2405         outb($$chip{addrreg}, $$chip{exit}); 
     2407        exit_superio($chip); 
    24062408        next; 
    24072409      }          
     
    24202422      } 
    24212423    } 
    2422     while ($addr = shift(@{$$chip{exitseq}})) { 
    2423       outb($addr, shift(@{$$chip{exitseq}})); 
    2424     } 
     2424    exit_superio($chip); 
    24252425  } 
    24262426}