blob: 637e43a22beeb8be7a3a15615e9b5b72b3c6cc58 [file] [log] [blame]
Priyanka Jainfd45ca02018-11-28 13:04:27 +00001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2018 NXP
4 */
5
Priyanka Jainfd45ca02018-11-28 13:04:27 +00006#include <fsl_ddr_sdram.h>
7#include <fsl_ddr_dimm_params.h>
Simon Glass3ba929a2020-10-30 21:38:53 -06008#include <asm/global_data.h>
Priyanka Jainfd45ca02018-11-28 13:04:27 +00009
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}