summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-10-27 23:47:31 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-10-28 00:09:36 +0100
commit553fb1fa86e933d351d8c8a25e3e718b7ff92c69 (patch)
tree22b1cdb1c4cce482e43b04ebb8ac3ed70b52017f
parent548a7dcc242452d447634beef792447515c324f8 (diff)
verdin-imx8mm: automatic ram size detectiontoradex_imx_v2018.03_4.14.98_2.3.0_bringup
Automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB. Note: This only works if we keep using similar RAM chips! Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--board/toradex/verdin-imx8mm/verdin-imx8mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 0d2620b782..6970a8d43d 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright 2019 Toradex
+ * Copyright 2019-2020 Toradex
*/
#include <common.h>
@@ -72,9 +72,9 @@ int dram_init(void)
{
/* rom_pointer[1] contains the size of TEE occupies */
if (rom_pointer[1])
- gd->ram_size = PHYS_SDRAM_SIZE - rom_pointer[1];
+ gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE) - rom_pointer[1];
else
- gd->ram_size = PHYS_SDRAM_SIZE;
+ gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
return 0;
}