public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Hangs at relocation on 460EX Target
Date: Thu, 23 Oct 2008 09:15:03 +0200	[thread overview]
Message-ID: <200810230915.04087.sr@denx.de> (raw)
In-Reply-To: <4900194F.6040408@embedded-sol.com>

Felix,

On Thursday 23 October 2008, Felix Radensky wrote:
> I had the same problem with u-boot-1.3.4 on custom 460EX board with
> registered SODIMM. The SPD code in 4xx_spd_ddr2.c (program_copt1())
> checks two  SPD fields to decide whether DIMM is registered: DDRII DIMM
> type (offset 20) and SDRAM module attributes (offset 21).
>
> In my case, the values in these fields do not match what code is looking
> for.
> See http://www.micron.com/products/spddetail.aspx?part=MT9HTF6472RHY-667F1
> I had to modify the following peice in program_copt1() to make it work:
>
>             if (dimm_num == 0) {
>                 if (dimm_populated[dimm_num] == SDRAM_DDR1) /* DDR1 type */
>                     mcopt1 |= SDRAM_MCOPT1_DDR1_TYPE;
>                 if (dimm_populated[dimm_num] == SDRAM_DDR2) /* DDR2 type */
>                     mcopt1 |= SDRAM_MCOPT1_DDR2_TYPE;
>                 if (registered == 1) { /* DDR2 always buffered */
>                     /* TODO: what about above  comments ? */
>                     mcopt1 |= SDRAM_MCOPT1_RDEN;
>                     buf0 = TRUE;
>                 } else {
>                     /* TODO: the mask 0x02 doesn't match Samsung def for
> byte 21. */

So it seems already to be know that here is a problem.

>                     if ((attribute & 0x02) == 0x00) {
>                         /* buffered not supported */
>                         buf0 = FALSE;
>                     } else {
>                         mcopt1 |= SDRAM_MCOPT1_RDEN;
>                         buf0 = TRUE;
>                     }
>                 }
>             }
>
> I've changed
>
> if ((attribute & 0x02) == 0x00)
>
> to be
>
> if (((attribute & 0x02) == 0x00) && (attribute != 0x04))

Why did you change it this way? Which DDR2 module are you using? And what's 
the value of SPD register 21?

> I'm not sure this is generic enough to go into mainline, but if yes,
> I can try to submit a patch.

We should try to provide a generic fix now. Unfortunately I don't have the 
time right now to dig into the DDR2 SPD definitions and the different 
implementation for different brands (Micron, Samsung...). Perhaps somebody 
else could check what the correct check for registered DIMM is.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2008-10-23  7:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 15:37 [U-Boot] Hangs at relocation on 460EX Target Ayman M. El-Khashab
2008-10-21 15:54 ` Stefan Roese
2008-10-21 16:20   ` Ayman M. El-Khashab
2008-10-21 19:10     ` Wolfgang Denk
2008-10-21 21:59       ` Ayman M. El-Khashab
2008-10-22  5:12         ` Stefan Roese
2008-10-23  0:59           ` Ayman M. El-Khashab
2008-10-23  4:02             ` Stefan Roese
2008-10-23  6:27               ` Felix Radensky
2008-10-23  7:15                 ` Stefan Roese [this message]
2008-10-23  7:31                   ` Felix Radensky
2008-10-23  8:39                     ` Stefan Roese
2008-10-27 14:34                       ` Ayman M. El-Khashab

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=200810230915.04087.sr@denx.de \
    --to=sr@denx.de \
    --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