#include <common.h>
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
+#include <log.h>
#include <asm/arch/soc.h>
#include <asm/arch/clock.h>
+#include <asm/global_data.h>
#include "ddr.h"
DECLARE_GLOBAL_DATA_PTR;
DDR_CDR2_VREF_TRAIN_EN | DDR_CDR2_VREF_RANGE_2;
}
+#ifdef CONFIG_TFABOOT
+int fsl_initdram(void)
+{
+ gd->ram_size = tfa_get_dram_size();
+
+ if (!gd->ram_size)
+ gd->ram_size = fsl_ddr_sdram_size();
+ return 0;
+}
+#else
int fsl_initdram(void)
{
puts("Initializing DDR....using SPD\n");
#endif
return 0;
}
+#endif /* CONFIG_TFABOOT */