diff options
author | Andrew Davis <afd@ti.com> | 2023-04-06 19:38:20 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-24 20:18:48 +0300 |
commit | 29627e81c63d1e0e52de7936e768e07efdaf840c (patch) | |
tree | 7e7135f58901c8a1e24677b094797a2020abff61 /board/ti/j721s2/evm.c | |
parent | ef538cc26e490544d48084897472cbcee0430dde (diff) | |
download | u-boot-29627e81c63d1e0e52de7936e768e07efdaf840c.tar.xz |
arm: mach-k3: Move J721s2 SPL init functions to mach-k3
This matches AM64 and J721e and removes the need to forward
declare k3_spl_init(), k3_mem_init(), and check_rom_loaded_sysfw()
in sys_proto.h.
Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'board/ti/j721s2/evm.c')
-rw-r--r-- | board/ti/j721s2/evm.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index 9b130c141a..d3f9a65589 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -192,66 +192,3 @@ int board_late_init(void) void spl_board_init(void) { } - -/* Support for the various EVM / SK families */ -#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) -void do_dt_magic(void) -{ - int ret, rescan, mmc_dev = -1; - static struct mmc *mmc; - - do_board_detect(); - - /* - * Board detection has been done. - * Let us see if another dtb wouldn't be a better match - * for our board - */ - if (IS_ENABLED(CONFIG_CPU_V7R)) { - ret = fdtdec_resetup(&rescan); - if (!ret && rescan) { - dm_uninit(); - dm_init_and_scan(true); - } - } - - /* - * Because of multi DTB configuration, the MMC device has - * to be re-initialized after reconfiguring FDT inorder to - * boot from MMC. Do this when boot mode is MMC and ROM has - * not loaded SYSFW. - */ - switch (spl_boot_device()) { - case BOOT_DEVICE_MMC1: - mmc_dev = 0; - break; - case BOOT_DEVICE_MMC2: - case BOOT_DEVICE_MMC2_2: - mmc_dev = 1; - break; - } - - if (mmc_dev > 0 && !check_rom_loaded_sysfw()) { - ret = mmc_init_device(mmc_dev); - if (!ret) { - mmc = find_mmc_device(mmc_dev); - if (mmc) { - ret = mmc_init(mmc); - if (ret) - printf("mmc init failed with error: %d\n", ret); - } - } - } -} -#endif - -#ifdef CONFIG_SPL_BUILD -void board_init_f(ulong dummy) -{ - k3_spl_init(); -#if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT) - do_dt_magic(); -#endif - k3_mem_init(); -} -#endif |