diff options
author | Wolfgang Denk <wd@denx.de> | 2008-09-12 15:24:54 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-09-12 15:24:54 +0200 |
commit | 6b8be3e58e9cc1badb7a709b0f3568d4d8eca4b7 (patch) | |
tree | a7468c1a17feaf28d8ef3443fe5b6f544ecddb72 /cpu/ppc4xx/sdram.c | |
parent | 7238ada313057a85409485b8ee21515dc10c07a5 (diff) | |
parent | b476b032562aae5a09985f7e22232a5ee7042746 (diff) | |
download | u-boot-imx-6b8be3e58e9cc1badb7a709b0f3568d4d8eca4b7.zip u-boot-imx-6b8be3e58e9cc1badb7a709b0f3568d4d8eca4b7.tar.gz u-boot-imx-6b8be3e58e9cc1badb7a709b0f3568d4d8eca4b7.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'cpu/ppc4xx/sdram.c')
-rw-r--r-- | cpu/ppc4xx/sdram.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cpu/ppc4xx/sdram.c b/cpu/ppc4xx/sdram.c index 7d60ad6..b5a6a4c 100644 --- a/cpu/ppc4xx/sdram.c +++ b/cpu/ppc4xx/sdram.c @@ -209,15 +209,15 @@ phys_size_t initdram(int board_type) udelay(10000); if (get_ram_size(0, mb0cf[i].size) == mb0cf[i].size) { + phys_size_t size = mb0cf[i].size; + /* * OK, size detected. Enable second bank if * defined (assumes same type as bank 0) */ #ifdef CONFIG_SDRAM_BANK1 - u32 b1cr = mb0cf[i].size | mb0cf[i].reg; - mtsdram(mem_mcopt1, 0x00000000); - mtsdram(mem_mb1cf, b1cr); /* SDRAM0_B1CR */ + mtsdram(mem_mb1cf, mb0cf[i].size | mb0cf[i].reg); mtsdram(mem_mcopt1, 0x80800000); udelay(10000); @@ -230,13 +230,19 @@ phys_size_t initdram(int board_type) mb0cf[i].size) { mtsdram(mem_mb1cf, 0); mtsdram(mem_mcopt1, 0); + } else { + /* + * We have two identical banks, so the size + * is twice the bank size + */ + size = 2 * size; } #endif /* * OK, size detected -> all done */ - return mb0cf[i].size; + return size; } } |