Ralph Siemsen | 9446dfe | 2023-05-12 21:36:56 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | #include <common.h> |
| 4 | #include <dm.h> |
| 5 | #include <ram.h> |
| 6 | #include <asm/global_data.h> |
| 7 | |
| 8 | DECLARE_GLOBAL_DATA_PTR; |
| 9 | |
| 10 | int board_init(void) |
| 11 | { |
| 12 | gd->bd->bi_boot_params = gd->ram_base + 0x100; |
| 13 | |
| 14 | return 0; |
| 15 | } |
| 16 | |
| 17 | int dram_init(void) |
| 18 | { |
| 19 | struct udevice *dev; |
| 20 | int err; |
| 21 | |
| 22 | /* |
| 23 | * This will end up calling cadence_ddr_probe(), |
| 24 | * and will also update gd->ram_size. |
| 25 | */ |
| 26 | err = uclass_get_device(UCLASS_RAM, 0, &dev); |
| 27 | if (err) |
| 28 | debug("DRAM init failed: %d\n", err); |
| 29 | |
| 30 | return err; |
| 31 | } |