Changeset 1070

Show
Ignore:
Timestamp:
04/14/01 03:39:10 (14 years ago)
Author:
mds
Message:

add back temperature support for version 1 of chip.

The temperature registers are in different places for the two
versions. Both versions unfortunately have the same PCI ID.
Apparently the temperature conversion formulas are different
for the two versions. Neither is yet implemented in the driver.

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r1067 r1070  
    4343                 Save BIOS pin configuration of temps and fans 
    4444  Module sensors: Disabled, moved to i2c package as i2c-proc.c 
    45   Module sis5595: Fix temp, add in4. 
     45  Module sis5595: Fix temp, add in4 for chip revision 0xc0. 
    4646  Module via686a: Allow force=9191,address (for A7V/K7V boards) 
    4747  Module w83781d: Don't reinitialize as99127f chip; this may cause fan/temp 
     
    5858  Program sensors-detect: Recognize lm78 with chipid=0x20; 
    5959                          Recognize SMSC Victory66 South Bridge; 
    60                           Add devfs /dev/i2c/x support 
     60                          Add devfs /dev/i2c/x support; 
     61                          Add thinkpad warning. 
    6162  Program tellerstats: new 
    6263 
  • lm-sensors/trunk/doc/chips/sis5595

    r1066 r1070  
    99    Addresses scanned: ISA in PCI-space encoded address 
    1010    Datasheet: Publicly available at the Silicon Integrated Systems Corp. site. 
     11 
     12    Supports following revisions: 
     13        Version         PCI ID          PCI Revision 
     14        1               1039/0008       01 
     15        2               1039/0008       C0 
    1116 
    1217Author: Kyösti Mälkki <kmalkki@cc.hut.fi> 
     
    2833sensors, four or five voltage sensors, and alarms. 
    2934 
    30 The temperature sensor (temp) and the fifth voltage sensor (in4) share a pin 
     35On the first version of the chip, there are four voltage 
     36sensors and one temperature sensor. 
     37 
     38On the second version of the chip, 
     39the temperature sensor (temp) and the fifth voltage sensor (in4) share a pin 
    3140which is configurable, but not through the driver. Sorry. 
    3241The driver senses the configuration of the pin, which was hopefully 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r1068 r1070  
    2020    along with this program; if not, write to the Free Software 
    2121    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
     22*/ 
     23 
     24/*  
     25    Supports following revisions: 
     26        Version         PCI ID          PCI Revision 
     27        1               1039/0008       01 
     28        2               1039/0008       C0 
    2229*/ 
    2330 
     
    6875#define SIS5595_EXTENT 8 
    6976/* PCI Config Registers */ 
     77#define SIS5595_REVISION_REG 0x08 
    7078#define SIS5595_BASE_REG 0x68 
    7179#define SIS5595_PIN_REG 0x7A 
     
    8492#define SIS5595_REG_FAN(nr) (0x27 + (nr)) 
    8593 
    86 /* TEMP pin is shared with IN4, configured in PCI register 0x7A. */ 
    87 /* The registers are the same as well. */ 
    88 /* OVER and HYST are really MAX and MIN. */ 
    89 #define SIS5595_REG_TEMP        SIS5595_REG_IN(4) 
    90 #define SIS5595_REG_TEMP_OVER   SIS5595_REG_IN_MAX(4) 
    91 #define SIS5595_REG_TEMP_HYST   SIS5595_REG_IN_MIN(4) 
     94/* On the first version of the chip, the temp registers are separate. 
     95   On the second version, 
     96   TEMP pin is shared with IN4, configured in PCI register 0x7A. 
     97   The registers are the same as well. 
     98   OVER and HYST are really MAX and MIN. */ 
     99 
     100#define SIS5595_REG_TEMP        (( data->revision) >= 0xc0) ? \ 
     101                                        SIS5595_REG_IN(4) : 0x27 
     102#define SIS5595_REG_TEMP_OVER   (( data->revision) >= 0xc0) ? \ 
     103                                        SIS5595_REG_IN_MAX(4) : 0x39 
     104#define SIS5595_REG_TEMP_HYST   (( data->revision) >= 0xc0) ? \ 
     105                                        SIS5595_REG_IN_MIN(4) : 0x3a 
    92106 
    93107#define SIS5595_REG_CONFIG 0x40 
     
    178192        unsigned long last_updated;     /* In jiffies */ 
    179193        char maxins;            /* == 3 if temp enabled, otherwise == 4 */ 
     194        u8 revision;            /* Reg. value */ 
    180195 
    181196        u8 in[5];               /* Register value */ 
     
    358373        request_region(address, SIS5595_EXTENT, type_name); 
    359374 
    360         pci_read_config_byte(s_bridge, SIS5595_PIN_REG, &val); 
    361         if(val & 0x80) 
    362                 /* 3 voltages, 1 temp */ 
     375        pci_read_config_byte(s_bridge, SIS5595_PIN_REG, &(data->revision)); 
     376        if(data->revision < 0xc0) { 
    363377                data->maxins = 3; 
    364         else 
    365                 /* 4 voltages, no temps */ 
    366                 data->maxins = 4; 
     378        } else { 
     379                pci_read_config_byte(s_bridge, SIS5595_PIN_REG, &val); 
     380                if(val & 0x80) 
     381                        /* 3 voltages, 1 temp */ 
     382                        data->maxins = 3; 
     383                else 
     384                        /* 4 voltages, no temps */ 
     385                        data->maxins = 4; 
     386        } 
    367387 
    368388        /* Fill in the remaining client fields and put it into the global list */