Hardware/LPC/LPCGroup.cs
changeset 34 dc276daadb2c
parent 31 c4d1fb76a9e1
child 54 f940fe2a7c2b
     1.1 --- a/Hardware/LPC/LPCGroup.cs	Sun Feb 07 20:59:13 2010 +0000
     1.2 +++ b/Hardware/LPC/LPCGroup.cs	Mon Feb 08 20:18:25 2010 +0000
     1.3 @@ -75,6 +75,7 @@
     1.4        WinRing0.WriteIoPortByte(valuePort, logicalDeviceNumber);
     1.5      }
     1.6  
     1.7 +    // ITE
     1.8      private const byte IT87_ENVIRONMENT_CONTROLLER_LDN = 0x04;    
     1.9  
    1.10      private void IT87Enter() {
    1.11 @@ -93,7 +94,7 @@
    1.12      private const byte FINTEK_VENDOR_ID_REGISTER = 0x23;
    1.13      private const ushort FINTEK_VENDOR_ID = 0x1934;
    1.14  
    1.15 -    private const byte W83627_HARDWARE_MONITOR_LDN = 0x0B;
    1.16 +    private const byte WINBOND_HARDWARE_MONITOR_LDN = 0x0B;
    1.17  
    1.18      private const byte F71858_HARDWARE_MONITOR_LDN = 0x02;
    1.19      private const byte FINTEK_HARDWARE_MONITOR_LDN = 0x04;
    1.20 @@ -120,89 +121,80 @@
    1.21          byte logicalDeviceNumber;
    1.22          byte id = ReadByte(CHIP_ID_REGISTER);
    1.23          byte revision = ReadByte(CHIP_REVISION_REGISTER);
    1.24 +        chip = Chip.Unknown;
    1.25 +        logicalDeviceNumber = 0;
    1.26          switch (id) {
    1.27            case 0x05:
    1.28              switch (revision) {
    1.29                case 0x41:
    1.30                  chip = Chip.F71882;
    1.31                  logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
    1.32 -                break;
    1.33 -              default:
    1.34 -                chip = Chip.Unknown;
    1.35 -                logicalDeviceNumber = 0;
    1.36 -                break;
    1.37 +                break;              
    1.38              } break;
    1.39            case 0x06:
    1.40              switch (revision) {             
    1.41                case 0x01:
    1.42                  chip = Chip.F71862;
    1.43                  logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
    1.44 -                break;
    1.45 -              default:
    1.46 -                chip = Chip.Unknown;
    1.47 -                logicalDeviceNumber = 0;
    1.48 -                break;
    1.49 +                break;              
    1.50              } break;
    1.51            case 0x07:
    1.52              switch (revision) {
    1.53                case 0x23:
    1.54                  chip = Chip.F71889;
    1.55                  logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
    1.56 -                break;
    1.57 -              default:
    1.58 -                chip = Chip.Unknown;
    1.59 -                logicalDeviceNumber = 0;
    1.60 -                break;
    1.61 +                break;              
    1.62              } break;
    1.63            case 0x08:
    1.64              switch (revision) {
    1.65                case 0x14:
    1.66                  chip = Chip.F71869;
    1.67                  logicalDeviceNumber = FINTEK_HARDWARE_MONITOR_LDN;
    1.68 -                break;
    1.69 -              default:
    1.70 -                chip = Chip.Unknown;
    1.71 -                logicalDeviceNumber = 0;
    1.72 -                break;
    1.73 +                break;              
    1.74              } break;
    1.75            case 0x52:
    1.76              switch (revision) {
    1.77                case 0x17:
    1.78                case 0x3A:
    1.79                  chip = Chip.W83627HF;
    1.80 -                logicalDeviceNumber = W83627_HARDWARE_MONITOR_LDN;
    1.81 -                break;
    1.82 -              default:
    1.83 -                chip = Chip.Unknown;
    1.84 -                logicalDeviceNumber = 0;
    1.85 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;
    1.86 +                break;             
    1.87 +            } break;
    1.88 +          case 0x88:
    1.89 +            switch (revision & 0xF0) {
    1.90 +              case 0x60:
    1.91 +                chip = Chip.W83627EHF;
    1.92 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;
    1.93                  break;
    1.94              } break;
    1.95            case 0xA0:
    1.96              switch (revision & 0xF0) {
    1.97                case 0x20: 
    1.98                  chip = Chip.W83627DHG;
    1.99 -                logicalDeviceNumber = W83627_HARDWARE_MONITOR_LDN;  
   1.100 -                break;
   1.101 -              default: 
   1.102 -                chip = Chip.Unknown;
   1.103 -                logicalDeviceNumber = 0;
   1.104 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;  
   1.105 +                break;             
   1.106 +            } break;
   1.107 +          case 0xA5:
   1.108 +            switch (revision & 0xF0) {
   1.109 +              case 0x10:
   1.110 +                chip = Chip.W83667HG;
   1.111 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;
   1.112                  break;
   1.113              } break;
   1.114            case 0xB0:
   1.115              switch (revision & 0xF0) {
   1.116                case 0x70:
   1.117                  chip = Chip.W83627DHGP;
   1.118 -                logicalDeviceNumber = W83627_HARDWARE_MONITOR_LDN;
   1.119 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;
   1.120 +                break;             
   1.121 +            } break;
   1.122 +          case 0xB3:
   1.123 +            switch (revision & 0xF0) {
   1.124 +              case 0x50:
   1.125 +                chip = Chip.W83667HGB;
   1.126 +                logicalDeviceNumber = WINBOND_HARDWARE_MONITOR_LDN;
   1.127                  break;
   1.128 -              default:
   1.129 -                chip = Chip.Unknown;
   1.130 -                logicalDeviceNumber = 0;
   1.131 -                break;
   1.132 -            } break;  
   1.133 -          default:
   1.134 -            chip = Chip.Unknown; 
   1.135 -            logicalDeviceNumber = 0;
   1.136 -            break;
   1.137 +            } break; 
   1.138          }
   1.139          if (chip != Chip.Unknown) {
   1.140  
   1.141 @@ -217,16 +209,19 @@
   1.142  
   1.143            WinbondFintekExit();
   1.144  
   1.145 -          if (address != verify || address == 0 || (address & 0xF007) != 0)
   1.146 +          if (address != verify || address < 0x100 || (address & 0xF007) != 0)
   1.147              return;
   1.148            
   1.149            switch (chip) {
   1.150              case Chip.W83627DHG:
   1.151              case Chip.W83627DHGP:
   1.152 +            case Chip.W83627EHF:
   1.153              case Chip.W83627HF:
   1.154 -              W83627 w83627 = new W83627(chip, revision, address);
   1.155 -              if (w83627.IsAvailable)
   1.156 -                hardware.Add(w83627);
   1.157 +            case Chip.W83667HG:
   1.158 +            case Chip.W83667HGB:
   1.159 +              W836XX w836XX = new W836XX(chip, revision, address);
   1.160 +              if (w836XX.IsAvailable)
   1.161 +                hardware.Add(w836XX);
   1.162                break;
   1.163              case Chip.F71862:
   1.164              case Chip.F71882:
   1.165 @@ -261,7 +256,7 @@
   1.166  
   1.167            IT87Exit();
   1.168  
   1.169 -          if (address != verify || address == 0 || (address & 0xF007) != 0)
   1.170 +          if (address != verify || address < 0x100 || (address & 0xF007) != 0)
   1.171              return;
   1.172  
   1.173            IT87XX it87 = new IT87XX(chip, address);