blob: 74d3af5c359d4462a32817fbf5e5f6af59b41062 [file] [log] [blame]
Yuantian Tang353f36d2019-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>
9
10DECLARE_GLOBAL_DATA_PTR;
11
12int fsl_initdram(void)
13{
14 gd->ram_size = tfa_get_dram_size();
15
16 if (!gd->ram_size)
17 gd->ram_size = fsl_ddr_sdram_size();
18
19 return 0;
20}