public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@list.ru>
To: u-boot@lists.denx.de
Subject: [U-Boot] marvell: problems reading ddr spd
Date: Tue, 01 Sep 2015 15:21:16 +0300	[thread overview]
Message-ID: <55E5983C.6090001@list.ru> (raw)

Hello.

It seems u-boot uses wrong i2c address to read SPD on armada-xp.
Namely,
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/ddr/marvell/axp/ddr3_axp.h;h=d9e33f7c6e25602726d7c8fa077439037862d511;hb=HEAD
  39 #define BUS_WIDTH_ECC_TWSI_ADDR         0x4E
  40 #else
  41 #define BUS_WIDTH_ECC_TWSI_ADDR         0x4F
  42 #endif

Both 0x4e and 0x4f addresses do not exist, so ECC was never detected.
We changed to 0x56 - usual SPD address. Then is started to work with
some memory chips and hang with others. It appears ddr3_check_config()
reads wrong SPD bytes, applies wrong masks etc. Disabling AUTO_DETECTION_SUPPORT
was also troublesome, because of this piece:
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/ddr/marvell/axp/ddr3_init.c;h=11b85916b72836cf47be922b4995f9adca23a91c;hb=HEAD
 438 #if defined(ECC_SUPPORT) && defined(AUTO_DETECTION_SUPPORT)
 439         ecc = DRAM_ECC;
 440 #endif
 441
 442 #if defined(ECC_SUPPORT) && defined(AUTO_DETECTION_SUPPORT)
 443         ecc = 0;
 444         if (ddr3_check_config(BUS_WIDTH_ECC_TWSI_ADDR, CONFIG_ECC))
 445                 ecc = 1;
 446 #endif

Am I right that on line 438 the inversion operator (!) is missing?

At the end we got it to work, but with too many changes, which
makes me to suspect there is some misunderstanding on my side.
Can someone please hint me how that code should work and what
is the address 0x4e? Why it doesn't exist for us?

                 reply	other threads:[~2015-09-01 12:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=55E5983C.6090001@list.ru \
    --to=stsp@list.ru \
    --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