
On Thu, Oct 27, 2022 at 04:18:42PM +0530, Sinthu Raja wrote:
From: Sinthu Raja sinthu.raja@ti.com
Enable support for selecting DTB from FIT within SPL based on the board name read from EEPROM. This will help to use single defconfig for both EVM and SK.
Signed-off-by: Sinthu Raja sinthu.raja@ti.com
arch/arm/mach-k3/j721s2_init.c | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+)
diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 12da8136f9..fc5eee03b6 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -19,8 +19,10 @@ #include <dm.h> #include <dm/uclass-internal.h> #include <dm/pinctrl.h> +#include <fdt_support.h> #include <mmc.h> #include <remoteproc.h> +#include <dm/root.h>
static void ctrl_mmr_unlock(void) { @@ -93,6 +95,59 @@ static void store_boot_info_from_rom(void) sizeof(struct rom_extended_boot_data)); }
+#ifdef CONFIG_SPL_OF_LIST +void do_dt_magic(void) +{
- int ret, rescan, mmc_dev = -1;
- static struct mmc *mmc;
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
do_board_detect();
We need to try and avoid putting the CONFIG_TI_I2C_BOARD_DETECT calls and checks in the generic mach-k3 code as it's not required nor likely used on non-reference platforms. And again, if we do not need to move to a board-specific DTB in SPL, we do not want to, we want to push that off to full U-Boot.