Changeset 5733

Show
Ignore:
Timestamp:
06/09/09 13:13:41 (5 years ago)
Author:
khali
Message:

Decode voltage interface level of DDR SDRAM.

Location:
i2c-tools/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/CHANGES

    r5714 r5733  
    1212                Try harder to decode the manufacturing date 
    1313                Handle read errors on sysfs 
     14                Decode voltage interface level of DDR SDRAM 
    1415  decode-xeon: Delete 
    1516  i2c-stub-from-dump: Use udev settle to speed up initialization 
  • i2c-tools/trunk/eeprom/decode-dimms

    r5714 r5733  
    511511} 
    512512 
     513# Common to SDR, DDR and DDR2 SDRAM 
     514sub sdram_voltage_interface_level($) 
     515{ 
     516        my @levels = ( 
     517                "TTL (5V tolerant)",            #  0 
     518                "LVTTL (not 5V tolerant)",      #  1 
     519                "HSTL 1.5V",                    #  2 
     520                "SSTL 3.3V",                    #  3 
     521                "SSTL 2.5V",                    #  4 
     522                "SSTL 1.8V",                    #  5 
     523        ); 
     524         
     525        return ($_[0] < @levels) ? $levels[$_[0]] : "Undefined!"; 
     526} 
     527 
    513528# Parameter: EEPROM bytes 0-127 (using 3-62) 
    514529sub decode_sdr_sdram($) 
     
    579594        printl("Data Width", $temp); 
    580595 
    581         if ($bytes->[8] == 0) { $temp = "5.0 Volt/TTL"; } 
    582         elsif ($bytes->[8] == 1) { $temp = "LVTTL"; } 
    583         elsif ($bytes->[8] == 2) { $temp = "HSTL 1.5"; } 
    584         elsif ($bytes->[8] == 3) { $temp = "SSTL 3.3"; } 
    585         elsif ($bytes->[8] == 4) { $temp = "SSTL 2.5"; } 
    586         elsif ($bytes->[8] == 255) { $temp = "New Table"; } 
    587         else { $temp = "Undefined!"; } 
    588         printl("Module Interface Signal Levels", $temp); 
     596        printl("Voltage Interface Level", 
     597               sdram_voltage_interface_level($bytes->[8])); 
    589598 
    590599        if ($bytes->[11] == 0) { $temp = "No Parity"; } 
     
    810819        } 
    811820 
     821        printl("Voltage Interface Level", 
     822               sdram_voltage_interface_level($bytes->[8])); 
     823 
    812824        my $highestCAS = 0; 
    813825        my %cas; 
     
    10021014        printl("DRAM Package", $bytes->[5] & 0x10 ? "Stack" : "Planar"); 
    10031015 
    1004         my @volts = ("TTL (5V Tolerant)", "LVTTL", "HSTL 1.5V", 
    1005                      "SSTL 3.3V", "SSTL 2.5V", "SSTL 1.8V", "TBD"); 
    1006         printl("Voltage Interface Level", $volts[$bytes->[8]]); 
     1016        printl("Voltage Interface Level", 
     1017               sdram_voltage_interface_level($bytes->[8])); 
    10071018 
    10081019        printl("Refresh Rate", ddr2_refresh_rate($bytes->[12]));