blob: 3e976da6b305805fb8a09ee7312af32a6aa30e6c [file] [log] [blame]
Yuantian Tang92f18ff2019-04-10 16:43:34 +08001// 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>
Simon Glass3ba929a2020-10-30 21:38:53 -06009#include <asm/global_data.h>
Yuantian Tang92f18ff2019-04-10 16:43:34 +080010
11DECLARE_GLOBAL_DATA_PTR;
12
13int 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}