提交 72a1b9a9 编写于 作者: M Marcel Ziswiler 提交者: Stefano Babic

verdin-imx8mm: automatic ram size detection

Implement board_phys_sdram_size() to 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: NMarcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: NOleksandr Suvorov <oleksandr.suvorov@toradex.com>
上级 2a1a2559
......@@ -180,6 +180,16 @@ int board_late_init(void)
return 0;
}
int board_phys_sdram_size(phys_size_t *size)
{
if (!size)
return -EINVAL;
*size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
return 0;
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册