Changeset 5928

Show
Ignore:
Timestamp:
02/16/11 13:18:52 (3 years ago)
Author:
khali
Message:

Decode module configuration type and refresh rate of DDR SDRAM.

Location:
i2c-tools/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/CHANGES

    r5925 r5928  
    33 
    44SVN 
     5  decode-dimms: Decode module configuration type of DDR SDRAM 
     6                Decode refresh rate of DDR SDRAM 
    57  i2c-dev.h: Make value arrays const for block write functions 
    68  i2cset: Add support for SMBus and I2C block writes 
  • i2c-tools/trunk/eeprom/decode-dimms

    r5733 r5928  
    526526} 
    527527 
     528# Common to SDR and DDR SDRAM 
     529sub sdram_module_configuration_type($) 
     530{ 
     531        my @types = ( 
     532                "No Parity",                    # 0 
     533                "Parity",                       # 1 
     534                "ECC",                          # 2 
     535        ); 
     536 
     537        return ($_[0] < @types) ? $types[$_[0]] : "Undefined!"; 
     538} 
     539 
    528540# Parameter: EEPROM bytes 0-127 (using 3-62) 
    529541sub decode_sdr_sdram($) 
     
    597609               sdram_voltage_interface_level($bytes->[8])); 
    598610 
    599         if ($bytes->[11] == 0) { $temp = "No Parity"; } 
    600         elsif ($bytes->[11] == 1) { $temp = "Parity"; } 
    601         elsif ($bytes->[11] == 2) { $temp = "ECC";  } 
    602         else { $temp = "Undefined!"; } 
    603         printl("Module Configuration Type", $temp); 
    604  
    605         if ($bytes->[12] & 0x80) { $temp = "Self Refreshing"; } 
    606         else { $temp = "Not Self Refreshing"; } 
    607         printl("Refresh Type", $temp); 
    608  
    609         $temp = $bytes->[12] & 0x7f; 
    610         if ($temp == 0) { $temp = "Normal (15.625 us)"; } 
    611         elsif ($temp == 1) { $temp = "Reduced (3.9 us)"; } 
    612         elsif ($temp == 2) { $temp = "Reduced (7.8 us)"; } 
    613         elsif ($temp == 3) { $temp = "Extended (31.3 us)"; } 
    614         elsif ($temp == 4) { $temp = "Extended (62.5 us)"; } 
    615         elsif ($temp == 5) { $temp = "Extended (125 us)"; } 
    616         else { $temp = "Undefined!"; } 
    617         printl("Refresh Rate", $temp); 
     611        printl("Module Configuration Type", 
     612               sdram_module_configuration_type($bytes->[11])); 
     613 
     614        printl("Refresh Rate", ddr2_refresh_rate($bytes->[12])); 
    618615 
    619616        if ($bytes->[13] & 0x80) { $temp = "Bank2 = 2 x Bank1"; } 
     
    822819               sdram_voltage_interface_level($bytes->[8])); 
    823820 
     821        printl("Module Configuration Type", 
     822               sdram_module_configuration_type($bytes->[11])); 
     823 
     824        printl("Refresh Rate", ddr2_refresh_rate($bytes->[12])); 
     825 
    824826        my $highestCAS = 0; 
    825827        my %cas; 
     
    950952} 
    951953 
     954# Common to SDR, DDR and DDR2 SDRAM 
    952955sub ddr2_refresh_rate($) 
    953956{