blob: 3351544c5b37d1e494f089ad541f8769841ca2ae [file] [log] [blame]
Bryan Brattlofa0659a52022-11-03 19:13:57 -05001// 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 Brattlofa0659a52022-11-03 19:13:57 -050010#include <asm/io.h>
Bryan Brattlofa0659a52022-11-03 19:13:57 -050011#include <dm/uclass.h>
12#include <env.h>
13#include <fdt_support.h>
14#include <spl.h>
Santhosh Kumar K25d150f2025-01-06 14:37:08 +053015#include <asm/arch/k3-ddr.h>
Bryan Brattlofa0659a52022-11-03 19:13:57 -050016
Nishanth Menon3713cc72024-02-12 13:47:18 -060017#include "../common/fdt_ops.h"
18
Bryan Brattlofa0659a52022-11-03 19:13:57 -050019int board_init(void)
20{
21 return 0;
22}
23
Santhosh Kumar K25d150f2025-01-06 14:37:08 +053024#if defined(CONFIG_XPL_BUILD)
25void spl_perform_fixups(struct spl_image_info *spl_image)
Bryan Brattlofa0659a52022-11-03 19:13:57 -050026{
Santhosh Kumar K25d150f2025-01-06 14:37:08 +053027 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 Brattlofa0659a52022-11-03 19:13:57 -050033}
Santhosh Kumar K25d150f2025-01-06 14:37:08 +053034#endif
Nishanth Menon3713cc72024-02-12 13:47:18 -060035
36#ifdef CONFIG_BOARD_LATE_INIT
37int board_late_init(void)
38{
39 ti_set_fdt_env(NULL, NULL);
40 return 0;
41}
42#endif