[U-Boot] marvell: problems reading ddr spd

Stas Sergeev stsp at list.ru
Tue Sep 1 14:21:16 CEST 2015


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?


More information about the U-Boot mailing list