Vabhav Sharma | 5164191 | 2019-06-06 12:35:28 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | ||||
3 | * Copyright 2019 NXP | ||||
4 | */ | ||||
5 | |||||
6 | #include <common.h> | ||||
7 | #include <fsl_ddr_sdram.h> | ||||
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 8 | #include <asm/global_data.h> |
Vabhav Sharma | 5164191 | 2019-06-06 12:35:28 +0000 | [diff] [blame] | 9 | |
10 | DECLARE_GLOBAL_DATA_PTR; | ||||
11 | |||||
12 | int 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 | } |