summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-11-03 09:34:53 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2016-03-09 15:03:28 +0100
commitb23e6aab214590ea245527fb637f1cf167c923ab (patch)
treee4c606503a45d6e5a9363777616b1266b6398146 /board
parent45bfcc802c01299f2684c29e73f559eb29f47da8 (diff)
DDR3 conf: autodetect RAM size
Use get_ram_size() to autodetect up to 2Gbyte of RAM on rank 0. If chips with two ranks would get stuffed one would have to set the size of one rank in DDRC_ADDRMAP0. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'board')
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c2
-rw-r--r--board/toradex/colibri_imx7/imximage.cfg8
2 files changed, 5 insertions, 5 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 81d6e59e0f5..5a3a1827217 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -108,7 +108,7 @@ struct i2c_pads_info i2c_pad_info3 = {
int dram_init(void)
{
- gd->ram_size = PHYS_SDRAM_SIZE;
+ gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
return 0;
}
diff --git a/board/toradex/colibri_imx7/imximage.cfg b/board/toradex/colibri_imx7/imximage.cfg
index 4ca885ce320..558dbf9b55b 100644
--- a/board/toradex/colibri_imx7/imximage.cfg
+++ b/board/toradex/colibri_imx7/imximage.cfg
@@ -103,13 +103,13 @@ DATA 4 0x307a0190 0x02098204
/* DDRC_DFITMG1 */
DATA 4 0x307a0194 0x00030303
/* DDRC_ADDRMAP0 */
-DATA 4 0x307a0200 0x00000016
+DATA 4 0x307a0200 0x0000001f
/* DDRC_ADDRMAP1 */
-DATA 4 0x307a0204 0x00171717
+DATA 4 0x307a0204 0x00080808
/* DDRC_ADDRMAP5 */
-DATA 4 0x307a0214 0x04040404
+DATA 4 0x307a0214 0x07070707
/* DDRC_ADDRMAP6 */
-DATA 4 0x307a0218 0x0f040404
+DATA 4 0x307a0218 0x07070707
/* DDRC_ODTCFG */
DATA 4 0x307a0240 0x06000601
/* DDRC_ODTMAP */