mirror of
https://github.com/smaeul/u-boot.git
synced 2025-09-12 04:56:02 +01:00
As there are few redundant functions in board/ti/*/evm.c files, pull them to a common location of access to reuse and include the common file to access the functions. Call k3-ddrss driver through fixup_ddr_driver_for_ecc() to fixup the device tree and resize the available amount of DDR, if ECC is enabled. Otherwise, fixup the device tree using the regular fdt_fixup_memory_banks(). Also call dram_init_banksize() after every call to fixup_ddr_driver_for_ecc() is made so that gd->bd is populated correctly. Ensure that fixup_ddr_driver_for_ecc() is agnostic to the number of DDR controllers present. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
13 lines
254 B
C
13 lines
254 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2024, Texas Instruments Incorporated - https://www.ti.com/
|
|
*/
|
|
|
|
#ifndef __K3_DDR_INIT_H
|
|
#define __K3_DDR_INIT_H
|
|
|
|
int dram_init(void);
|
|
int dram_init_banksize(void);
|
|
|
|
#endif /* __K3_DDR_INIT_H */
|