diff mbox series

[3/7] decode-dimms: Print DDR memory speed in MT/s not MHz

Message ID 20190903112215.4fc40aea@endymion
State Awaiting Upstream
Headers show
Series i2c-tools: Various fixes and improvements to decode-dimms | expand

Commit Message

Jean Delvare Sept. 3, 2019, 9:22 a.m. UTC
Because it is DDR memory, transaction rate is twice the actual clock
speed. What the user is interested in is MT/s, and that's the number
we display, so use the right unit.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 eeprom/decode-dimms |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

--- i2c-tools.orig/eeprom/decode-dimms	2019-09-02 11:43:00.090302646 +0200
+++ i2c-tools/eeprom/decode-dimms	2019-09-02 11:47:15.905567693 +0200
@@ -1043,7 +1043,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 MT/s (PC${pcclk})");
 
 #size computation
 	my $k = 0;
@@ -1296,7 +1296,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 MT/s (PC2-${pcclk})");
 
 #size computation
 	my $k = 0;
@@ -1626,7 +1626,7 @@  sub decode_ddr3_sdram($)
 	# Round down to comply with Jedec
 	$pcclk = $pcclk - ($pcclk % 100);
 	$ddrclk = int ($ddrclk);
-	printl("Maximum module speed", "$ddrclk MHz (PC3-${pcclk})");
+	printl("Maximum module speed", "$ddrclk MT/s (PC3-${pcclk})");
 
 # Size computation
 
@@ -1894,7 +1894,7 @@  sub decode_ddr4_sdram($)
 	# Round down to comply with Jedec
 	$pcclk = $pcclk - ($pcclk % 100);
 	$ddrclk = int ($ddrclk);
-	printl("Maximum module speed", "$ddrclk MHz (PC4-${pcclk})");
+	printl("Maximum module speed", "$ddrclk MT/s (PC4-${pcclk})");
 
 # Size computation
 	my $sdram_width = 4 << ($bytes->[12] & 0x07);