Backport fixes from upstream 3.1 branch:

- i2c-tools-r6151-space-before-MHz.diff: Print a space before "MHz"
  to improve readability.
- i2c-tools-r6152-fix-DDR3-tRAS-decoding.diff: Fix DDR3 tRAS
  decoding.
- i2c-tools-r6153-fix-DDR3-timings-rounding.diff: Fix DDR3 core
  timings rounding.
- i2c-tools-r6154-round-down-PC3-numbers.diff: Round down PC3
  numbers to comply with Jedec.
- i2c-tools-r6157-vendors-JEP106AK.diff: Update vendor list based
   on Jedec document JEP106AK.

OBS-URL: https://build.opensuse.org/package/show/Base:System/i2c-tools?expand=0&rev=26
This commit is contained in:
Jean Delvare 2013-04-17 20:36:52 +00:00 committed by Git OBS Bridge
parent b059c9dc3b
commit 595d43f146
8 changed files with 173 additions and 2 deletions

View File

@ -1,5 +1,5 @@
Subject: decode-dimms: Update vendor list
Upstream: yes, r6106
Upstream: yes, r6106, r6156
Update vendor list based on Jedec document JEP106AG. Contributed by
Thomas Gibson.
@ -70,7 +70,7 @@ Thomas Gibson.
"Marvell Semiconductors", "Netergy Microelectronic", "NVIDIA", "Internet Machines",
"Peak Electronics", "Litchfield Communication", "Accton Technology", "Teradiant Networks",
- "Europe Technologies", "Cortina Systems", "RAM Components", "Raqia Networks",
+ "Scaleo Chip (former Europe Technlogies)", "Cortina Systems", "RAM Components", "Raqia Networks",
+ "Scaleo Chip (former Europe Technologies)", "Cortina Systems", "RAM Components", "Raqia Networks",
"ClearSpeed", "Matsushita Battery", "Xelerated", "SimpleTech",
"Utron Technology", "Astec International", "AVM gmbH", "Redux Communications",
"Dot Hill Systems", "TeraChip"],

View File

@ -0,0 +1,59 @@
Subject: decode-dimms: Print a space before "MHz" to improve readability
Upstream: yes, r6151
Print a space before "MHz" to improve readability.
---
eeprom/decode-dimms | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -842,7 +842,7 @@ sub decode_ddr_sdram($)
$pcclk += 100 if ($pcclk % 100) >= 50; # Round properly
$pcclk = $pcclk - ($pcclk % 100);
$ddrclk = int ($ddrclk);
- printl("Maximum module speed", "${ddrclk}MHz (PC${pcclk})");
+ printl("Maximum module speed", "$ddrclk MHz (PC${pcclk})");
#size computation
my $k = 0;
@@ -1031,7 +1031,7 @@ sub decode_ddr2_sdram($)
# Round down to comply with Jedec
$pcclk = $pcclk - ($pcclk % 100);
$ddrclk = int ($ddrclk);
- printl("Maximum module speed", "${ddrclk}MHz (PC2-${pcclk})");
+ printl("Maximum module speed", "$ddrclk MHz (PC2-${pcclk})");
#size computation
my $k = 0;
@@ -1189,7 +1189,7 @@ sub decode_ddr3_sdram($)
my $tbits = 1 << (($bytes->[8] & 7) + 3);
my $pcclk = int ($ddrclk * $tbits / 8);
$ddrclk = int ($ddrclk);
- printl("Maximum module speed", "${ddrclk}MHz (PC3-${pcclk})");
+ printl("Maximum module speed", "$ddrclk MHz (PC3-${pcclk})");
# Size computation
@@ -1494,9 +1494,9 @@ sub decode_intel_spec_freq($)
prints("Intel Specification");
- if ($bytes->[126] == 0x66) { $temp = "66MHz"; }
- elsif ($bytes->[126] == 100) { $temp = "100MHz or 133MHz"; }
- elsif ($bytes->[126] == 133) { $temp = "133MHz"; }
+ if ($bytes->[126] == 0x66) { $temp = "66 MHz"; }
+ elsif ($bytes->[126] == 100) { $temp = "100 MHz or 133 MHz"; }
+ elsif ($bytes->[126] == 133) { $temp = "133 MHz"; }
else { $temp = "Undefined!"; }
printl("Frequency", $temp);
@@ -1512,7 +1512,7 @@ sub decode_intel_spec_freq($)
if ($bytes->[127] & 128) { $temp .= "CLK 0 Connected\n"; }
if (($bytes->[127] & 192) == 192) { $temp .= "Double-sided DIMM\n"; }
elsif (($bytes->[127] & 192) != 0) { $temp .= "Single-sided DIMM\n"; }
- printl("Details for 100MHz Support", $temp);
+ printl("Details for 100 MHz Support", $temp);
}
# Read various hex dump style formats: hexdump, hexdump -C, i2cdump, eeprog

View File

@ -0,0 +1,19 @@
Subject: decode-dimms: Fix DDR3 tRAS decoding
Upstream: yes, r6152
DDR3: Use the right nibble from byte 21 as the MSB of tRAS.
---
eeprom/decode-dimms | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1217,7 +1217,7 @@ sub decode_ddr3_sdram($)
$taa = int($bytes->[16] / $bytes->[12]);
$trcd = int($bytes->[18] / $bytes->[12]);
$trp = int($bytes->[20] / $bytes->[12]);
- $tras = int((($bytes->[21] >> 4) * 256 + $bytes->[22]) / $bytes->[12]);
+ $tras = int(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]);
printl("tCL-tRCD-tRP-tRAS", join("-", $taa, $trcd, $trp, $tras));

View File

@ -0,0 +1,25 @@
Subject: decode-dimms: Fix DDR3 core timings rounding
Upstream: yes, r6153
DDR3: Round core timings up, not down.
---
eeprom/decode-dimms | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1214,10 +1214,10 @@ sub decode_ddr3_sdram($)
my $trp;
my $tras;
- $taa = int($bytes->[16] / $bytes->[12]);
- $trcd = int($bytes->[18] / $bytes->[12]);
- $trp = int($bytes->[20] / $bytes->[12]);
- $tras = int(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]);
+ $taa = ceil($bytes->[16] / $bytes->[12]);
+ $trcd = ceil($bytes->[18] / $bytes->[12]);
+ $trp = ceil($bytes->[20] / $bytes->[12]);
+ $tras = ceil(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]);
printl("tCL-tRCD-tRP-tRAS", join("-", $taa, $trcd, $trp, $tras));

View File

@ -0,0 +1,19 @@
Subject: decode-dimms: Round down PC3 numbers to comply with Jedec
Upstream: yes, r6154
DDR3: Round down PC3 numbers to comply with Jedec.
---
eeprom/decode-dimms | 2 ++
1 file changed, 2 insertions(+)
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1188,6 +1188,8 @@ sub decode_ddr3_sdram($)
my $ddrclk = 2 * (1000 / $ctime);
my $tbits = 1 << (($bytes->[8] & 7) + 3);
my $pcclk = int ($ddrclk * $tbits / 8);
+ # Round down to comply with Jedec
+ $pcclk = $pcclk - ($pcclk % 100);
$ddrclk = int ($ddrclk);
printl("Maximum module speed", "$ddrclk MHz (PC3-${pcclk})");

View File

@ -0,0 +1,24 @@
Subject: decode-dimms: Update vendor list
Upstream: yes, r6157, r6160
Add manufacturer names from Jedec document JEP106AK.
---
eeprom/decode-dimms | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -296,7 +296,12 @@ $revision =~ s/ \([^()]*\)//;
"Eorex Corporation", "Xingtera", "Netsol", "Bestdon Technology Co. Ltd.", "Baysand Inc.",
"Uroad Technology Co. Ltd. (former Triple Grow Industrial Ltd.)", "Wilk Elektronik S.A.",
"AAI", "Harman", "Berg Microelectronics Inc.", "ASSIA, Inc.", "Visiontek Products LLC",
- "OCMEMORY", "Welink Solution Inc."]
+ "OCMEMORY", "Welink Solution Inc.", "Shark Gaming", "Avalanche Technology",
+ "R&D Center ELVEES OJSC", "KingboMars Technology Co. Ltd.",
+ "High Bridge Solutions Industria Eletronica", "Transcend Technology Co. Ltd.",
+ "Everspin Technologies", "Hon-Hai Precision", "Smart Storage Systems", "Toumaz Group",
+ "Zentel Electronics Corporation", "Panram International Corporation",
+ "Silicon Space Technology"]
);
$use_sysfs = -d '/sys/bus';

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Apr 17 22:10:55 CEST 2013 - jdelvare@suse.de
Backport fixes from upstream 3.1 branch:
- i2c-tools-r6151-space-before-MHz.diff: Print a space before "MHz"
to improve readability.
- i2c-tools-r6152-fix-DDR3-tRAS-decoding.diff: Fix DDR3 tRAS
decoding.
- i2c-tools-r6153-fix-DDR3-timings-rounding.diff: Fix DDR3 core
timings rounding.
- i2c-tools-r6154-round-down-PC3-numbers.diff: Round down PC3
numbers to comply with Jedec.
- i2c-tools-r6157-vendors-JEP106AK.diff: Update vendor list based
on Jedec document JEP106AK.
-------------------------------------------------------------------
Thu Mar 28 08:53:09 UTC 2013 - mmeister@suse.com

View File

@ -35,6 +35,11 @@ Patch5: i2c-tools-r6109-fix-decoding-revision.diff
Patch6: i2c-tools-r6110-i2cdetect-clarify-probing.diff
Patch7: i2c-tools-r6121-typo-sprint.diff
Patch8: i2c-tools-r6122-more-DDR3-module-types.diff
Patch9: i2c-tools-r6151-space-before-MHz.diff
Patch10: i2c-tools-r6152-fix-DDR3-tRAS-decoding.diff
Patch11: i2c-tools-r6153-fix-DDR3-timings-rounding.diff
Patch12: i2c-tools-r6154-round-down-PC3-numbers.diff
Patch13: i2c-tools-r6157-vendors-JEP106AK.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: s390 s390x
@ -62,6 +67,11 @@ Authors:
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}"