Merge tag 'xilinx-for-v2021.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u...
[platform/kernel/u-boot.git] / board / freescale / lx2160a / ddr.c
1 // 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>
9 #include <asm/global_data.h>
10
11 DECLARE_GLOBAL_DATA_PTR;
12
13 int 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 }