[PATCH] fixup! ddr_spd: add routine for printing DDR2 SPD contents in human-readable format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
drop floating point stuff 

 common/ddr_spd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/ddr_spd.c b/common/ddr_spd.c
index 39f383b..ec343ef 100644
--- a/common/ddr_spd.c
+++ b/common/ddr_spd.c
@@ -190,8 +190,8 @@ void ddr_spd_print(uint8_t *record)
 	pcclk = pcclk - (pcclk % 100);
 	i_i = (s->nrow_addr & 0x0f) + (s->ncol_addr & 0x0f) - 17;
 	k = ((s->mod_ranks & 0x7) + 1) * s->nbanks;
-	trcd = ((s->trcd >> 2) + ((s->trcd & 3) * 0.25)) * 100 / ctime;
-	trp = ((s->trp >> 2) + ((s->trp & 3) * 0.25)) * 100 / ctime;
+	trcd = ((s->trcd >> 2) * 4 + (s->trcd & 3)) * 25 / ctime;
+	trp = ((s->trp >> 2) * 4 + (s->trp & 3)) * 25 / ctime;
 	tras = s->tras * 100 / ctime ;
 	x = (int)(ctime / 100);
 	y = (ctime - (int)((ctime / 100) * 100)) / 10;
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux