Skip to content
Snippets Groups Projects
Commit f3a329ac authored by Martin Krause's avatar Martin Krause Committed by Wolfgang Denk
Browse files

TQM5200: fix bug in SDRAM initialization code


This patch fixes a bug in the SDRAM initialization code for the
TQM5200. The hi_addr bit is now set correctly. Without this patch
the hi_addr bit is always set to 1, if the second SDRAM bank is
not populated.

For other MPC5200 boards a correspondig patch has already been applied
some time ago, see commit a6310928.

Signed-off-by: default avatarMartin Krause <martin.krause@tqs.de>
--
Forget the first patch please. I confused flash with SDRAM in
the comment ...
parent 217bf6b6
No related branches found
No related tags found
No related merge requests found
...@@ -155,10 +155,13 @@ long int initdram (int board_type) ...@@ -155,10 +155,13 @@ long int initdram (int board_type)
*(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize + 0x0000001c; /* 512MB */ *(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize + 0x0000001c; /* 512MB */
/* find RAM size using SDRAM CS1 only */ /* find RAM size using SDRAM CS1 only */
sdram_start(0); if (!dramsize)
test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); sdram_start(0);
sdram_start(1); test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); if (!dramsize) {
sdram_start(1);
test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
}
if (test1 > test2) { if (test1 > test2) {
sdram_start(0); sdram_start(0);
dramsize2 = test1; dramsize2 = test1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment