[U-Boot-Users] [PATCH] Enable the isdram command on the MPC8360EMDS board

The isdram command prints out decoded information the "serial presence detect" (SPD) chip on the SDRAM SIMMs. This can be very helpful when debugging memory configuration problems.
Signed-off-by: Gerald Van Baren vanbaren@cideas.com ---
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
include/configs/MPC8360EMDS.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h index fdacb90..491bd4f 100644 --- a/include/configs/MPC8360EMDS.h +++ b/include/configs/MPC8360EMDS.h @@ -466,6 +466,7 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_I2C #define CONFIG_CMD_ASKENV +#define CONFIG_CMD_SDRAM
#if defined(CONFIG_PCI) #define CONFIG_CMD_PCI

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

Jon Loeliger wrote:
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.
[snip]
Weird, huh?
jdl
Hi Jon,
I'm kinda loosing the thread here. I think we are talking about two totally different decodes of the same data.
What I'm crediting Larry for isn't the decoding you are pointing to. You did machine decoding to make the DDR2 _work,_ which is invaluable.
Larry did the decoding to improve the human-readable output of the "isdram" command. This isn't invaluable in quite the same way, but still is really nice to be able to dump the SPD and decode it into ASCII for the poor developer. I don't know if your board(s) have CONFIG_CMD_SDRAM defined (it is off by default) - doesn't look like it. If not, turn it on and try it out.
Best regards, gvb

On Sat, 12 Jan 2008 13:24:14 -0500 Jerry Van Baren gvb.uboot@gmail.com wrote:
The isdram command prints out decoded information the "serial presence detect" (SPD) chip on the SDRAM SIMMs. This can be very helpful when debugging memory configuration problems.
Signed-off-by: Gerald Van Baren vanbaren@cideas.com
applied.
Thanks,
Kim
participants (4)
-
Jerry Van Baren
-
Jerry Van Baren
-
Jon Loeliger
-
Kim Phillips