aboutsummaryrefslogtreecommitdiff
path: root/board/compulab/cm_fx6
diff options
context:
space:
mode:
authorNikita Kiryanov2014-10-29 17:56:22 +0200
committerStefano Babic2014-11-05 17:18:01 +0100
commit0b23780ff02bdbec46fac1fe4151e2ebf1eae881 (patch)
treed67b37295134138d24b789d268f6953214e43540 /board/compulab/cm_fx6
parentb65cbab194307d29cdff2e246e2f97738d9b6a15 (diff)
arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo
The 1GB DRAM configuration on mx6 solo uses 2 chip selects, but the code tests 1GB DRAM configuration as if it is all present on one chip select, and thus cannot see the full range of available memory. Refactor the check to detect 1GB DRAM correctly. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'board/compulab/cm_fx6')
-rw-r--r--board/compulab/cm_fx6/spl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 3948ba23ae9..6fe937b4180 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -235,10 +235,11 @@ static int cm_fx6_spl_dram_init(void)
spl_mx6s_dram_init(DDR_32BIT_1GB, false);
bank1_size = get_ram_size((long int *)PHYS_SDRAM_1, 0x80000000);
- if (bank1_size == 0x40000000)
- return 0;
-
+ bank2_size = get_ram_size((long int *)PHYS_SDRAM_2, 0x80000000);
if (bank1_size == 0x20000000) {
+ if (bank2_size == 0x20000000)
+ return 0;
+
spl_mx6s_dram_init(DDR_32BIT_512MB, true);
return 0;
}