mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Smirnov <alllecs@yandex.ru>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org, Alexander Smirnov <alllecs@yandex.ru>
Subject: [PATCH] fixup! ddr_spd: add routine for printing DDR2 SPD contents in human-readable format
Date: Mon, 13 Jul 2015 17:47:00 +0300	[thread overview]
Message-ID: <1436798820-7999-1-git-send-email-alllecs@yandex.ru> (raw)

---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-07-13 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 14:47 Alexander Smirnov [this message]
2015-07-14  5:09 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436798820-7999-1-git-send-email-alllecs@yandex.ru \
    --to=alllecs@yandex.ru \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox