blob: 7ab7a9e6ca830d09217111266fc483bd7afd2643 [file] [log] [blame]
Priyanka Jainfd45ca02018-11-28 13:04:27 +00001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2018 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>
Priyanka Jainfd45ca02018-11-28 13:04:27 +000010
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}