1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2019 NXP
4  */
5 
6 #include <common.h>
7 #include <fsl_ddr_sdram.h>
8 #include <fsl_ddr_dimm_params.h>
9 #include <asm/global_data.h>
10 
11 DECLARE_GLOBAL_DATA_PTR;
12 
fsl_initdram(void)13 int fsl_initdram(void)
14 {
15 	gd->ram_size = tfa_get_dram_size();
16 
17 	if (!gd->ram_size)
18 		gd->ram_size = fsl_ddr_sdram_size();
19 
20 	return 0;
21 }
22