Nishanth Menon | ac205d8 | 2023-11-04 03:11:01 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * https://beagleboard.org/ai-64 |
| 4 | * |
| 5 | * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 | * Copyright (C) 2022-2023 Jason Kridner, BeagleBoard.org Foundation |
| 7 | * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation |
| 8 | */ |
| 9 | |
| 10 | #include <cpu_func.h> |
| 11 | #include <env.h> |
| 12 | #include <fdt_support.h> |
| 13 | #include <spl.h> |
| 14 | |
| 15 | DECLARE_GLOBAL_DATA_PTR; |
| 16 | |
| 17 | int board_init(void) |
| 18 | { |
| 19 | return 0; |
| 20 | } |
| 21 | |
| 22 | int dram_init(void) |
| 23 | { |
| 24 | return fdtdec_setup_mem_size_base(); |
| 25 | } |
| 26 | |
| 27 | int dram_init_banksize(void) |
| 28 | { |
| 29 | return fdtdec_setup_memory_banksize(); |
| 30 | } |
Nishanth Menon | 9a94f2c | 2024-02-12 13:47:24 -0600 | [diff] [blame] | 31 | |
| 32 | #ifdef CONFIG_BOARD_LATE_INIT |
| 33 | int board_late_init(void) |
| 34 | { |
| 35 | char fdtfile[50]; |
| 36 | |
| 37 | snprintf(fdtfile, sizeof(fdtfile), "%s/%s.dtb", |
| 38 | CONFIG_TI_FDT_FOLDER_PATH, CONFIG_DEFAULT_DEVICE_TREE); |
| 39 | |
| 40 | env_set("fdtfile", fdtfile); |
| 41 | |
| 42 | return 0; |
| 43 | } |
| 44 | #endif |