Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Board specific initialization for AM62Ax platforms |
| 4 | * |
| 5 | * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | #include <asm/arch/hardware.h> |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 10 | #include <asm/io.h> |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 11 | #include <dm/uclass.h> |
| 12 | #include <env.h> |
| 13 | #include <fdt_support.h> |
| 14 | #include <spl.h> |
Santhosh Kumar K | 25d150f | 2025-01-06 14:37:08 +0530 | [diff] [blame] | 15 | #include <asm/arch/k3-ddr.h> |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 16 | |
Nishanth Menon | 3713cc7 | 2024-02-12 13:47:18 -0600 | [diff] [blame] | 17 | #include "../common/fdt_ops.h" |
| 18 | |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 19 | int board_init(void) |
| 20 | { |
| 21 | return 0; |
| 22 | } |
| 23 | |
Santhosh Kumar K | 25d150f | 2025-01-06 14:37:08 +0530 | [diff] [blame] | 24 | #if defined(CONFIG_XPL_BUILD) |
| 25 | void spl_perform_fixups(struct spl_image_info *spl_image) |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 26 | { |
Santhosh Kumar K | 25d150f | 2025-01-06 14:37:08 +0530 | [diff] [blame] | 27 | if (IS_ENABLED(CONFIG_K3_DDRSS)) { |
| 28 | if (IS_ENABLED(CONFIG_K3_INLINE_ECC)) |
| 29 | fixup_ddr_driver_for_ecc(spl_image); |
| 30 | } else { |
| 31 | fixup_memory_node(spl_image); |
| 32 | } |
Bryan Brattlof | a0659a5 | 2022-11-03 19:13:57 -0500 | [diff] [blame] | 33 | } |
Santhosh Kumar K | 25d150f | 2025-01-06 14:37:08 +0530 | [diff] [blame] | 34 | #endif |
Nishanth Menon | 3713cc7 | 2024-02-12 13:47:18 -0600 | [diff] [blame] | 35 | |
| 36 | #ifdef CONFIG_BOARD_LATE_INIT |
| 37 | int board_late_init(void) |
| 38 | { |
| 39 | ti_set_fdt_env(NULL, NULL); |
| 40 | return 0; |
| 41 | } |
| 42 | #endif |