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 | |
Vabhav Sharma | 5164191 | 2019-06-06 12:35:28 +0000 | [diff] [blame] | 6 | #include <fsl_ddr_sdram.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 7 | #include <asm/global_data.h> |
Vabhav Sharma | 5164191 | 2019-06-06 12:35:28 +0000 | [diff] [blame] | 8 | |
| 9 | DECLARE_GLOBAL_DATA_PTR; |
| 10 | |
| 11 | int fsl_initdram(void) |
| 12 | { |
| 13 | gd->ram_size = tfa_get_dram_size(); |
| 14 | |
| 15 | if (!gd->ram_size) |
| 16 | gd->ram_size = fsl_ddr_sdram_size(); |
| 17 | |
| 18 | return 0; |
| 19 | } |