diff options
author | Martin Krause <martin.krause@tqs.de> | 2008-02-25 13:27:52 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-03-02 21:22:27 +0100 |
commit | f3a329acb26017d8e10e9c93e1e726c2a5ac634a (patch) | |
tree | a6650a066304491897c4558e3e95213995946c71 /board/tqm5200 | |
parent | 217bf6b6a313d9ccb619a4dbc09f73f77cd48df1 (diff) | |
download | u-boot-imx-f3a329acb26017d8e10e9c93e1e726c2a5ac634a.zip u-boot-imx-f3a329acb26017d8e10e9c93e1e726c2a5ac634a.tar.gz u-boot-imx-f3a329acb26017d8e10e9c93e1e726c2a5ac634a.tar.bz2 |
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 a63109281ad41b0fb489fdcb901171f76bcdbc2c.
Signed-off-by: Martin Krause <martin.krause@tqs.de>
--
Forget the first patch please. I confused flash with SDRAM in
the comment ...
Diffstat (limited to 'board/tqm5200')
-rw-r--r-- | board/tqm5200/tqm5200.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index 905a043..8c3f701 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -155,10 +155,13 @@ long int initdram (int board_type) *(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize + 0x0000001c; /* 512MB */ /* find RAM size using SDRAM CS1 only */ - sdram_start(0); - test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); - sdram_start(1); - test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000); + if (!dramsize) + sdram_start(0); + test2 = test1 = 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) { sdram_start(0); dramsize2 = test1; |