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