From: Jon Loeliger <jdl@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Enable the isdram command on the MPC8360EMDS board
Date: Mon, 14 Jan 2008 13:51:09 -0600 [thread overview]
Message-ID: <1200340269.5251.6.camel@ld0161-tx32> (raw)
In-Reply-To: <20080112182413.GA11442@cideas.com>
On Sat, 2008-01-12 at 12:24, Jerry Van Baren wrote:
> Hi Kim,
>
> The isdram command is controlled separately from the rest of the i2c
> commands (CONFIG_CMD_I2C + CONFIG_CMD_SDRAM). I did this originally
> because the isdram command was arguably a memory consuming luxury.
> Luxuries tend to become necessities over time...
>
> Larry Johnson submitted a patch yesterday to extend the decoding and
> printout to include DDR2 fields, making this even more useful (and jdl
> is claiming a share of the credit ;-).
>
> gvb
I'm not claiming any credit for it, but if I do the
following command:
$ git show d9b94f28a442b001 -- cpu/mpc85xx/spd_sdram.c
Someone who impersonated me quite well appears to have
checked in whole bunch of DDR2 decode stuff way back in
July of 2005.
For example:
+/*
+ * Convert a two-nibble BCD value into a cycle time.
+ * While the spec calls for nano-seconds, picos are returned.
+ *
+ * This implements the tables for bytes 9, 23 and 25 for both
+ * DDR I and II. No allowance for distinguishing the invalid
+ * fields absent for DDR I yet present in DDR II is made.
+ * (That is, cycle times of .25, .33, .66 and .75 ns are
+ * allowed for both DDR II and I.)
+ */
+
unsigned int
-banksize(unsigned char row_dens)
+convert_bcd_tenths_to_cycle_time_ps(unsigned int spd_val)
{
- return ((row_dens >> 2) | ((row_dens & 3) << 6)) << 24;
+ /*
+ * Table look up the lower nibble, allow DDR I & II.
+ */
+ unsigned int tenths_ps[16] = {
+ 0,
+ 100,
+ 200,
+ 300,
+ 400,
+ 500,
+ 600,
+ 700,
+ 800,
+ 900,
+ 250,
+ 330, /* FIXME: Is 333 better/valid? */
+ 660, /* FIXME: Is 667 better/valid? */
+ 750,
+ 0, /* undefined */
+ 0 /* undefined */
+ };
+
Weird, huh?
jdl
next prev parent reply other threads:[~2008-01-14 19:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-12 18:24 [U-Boot-Users] [PATCH] Enable the isdram command on the MPC8360EMDS board Jerry Van Baren
2008-01-14 19:51 ` Jon Loeliger [this message]
2008-01-14 21:08 ` Jerry Van Baren
2008-01-14 22:26 ` Kim Phillips
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=1200340269.5251.6.camel@ld0161-tx32 \
--to=jdl@freescale.com \
--cc=u-boot@lists.denx.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