Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 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> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 9 | #include <asm/global_data.h> |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 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 | } |