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