engicam: common: Move board_late_init
Move board_late_init into common area from supported boards.
Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
diff --git a/board/engicam/isiotmx6ul/isiotmx6ul.c b/board/engicam/isiotmx6ul/isiotmx6ul.c
index 6607b04..105db73 100644
--- a/board/engicam/isiotmx6ul/isiotmx6ul.c
+++ b/board/engicam/isiotmx6ul/isiotmx6ul.c
@@ -98,27 +98,8 @@
}
#endif
-int board_late_init(void)
+void setenv_fdt_file(void)
{
- switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >>
- IMX6_BMODE_SHIFT) {
- case IMX6_BMODE_SD:
- case IMX6_BMODE_ESD:
- case IMX6_BMODE_MMC:
- case IMX6_BMODE_EMMC:
-#ifdef CONFIG_ENV_IS_IN_MMC
- mmc_late_init();
-#endif
- setenv("modeboot", "mmcboot");
- break;
- case IMX6_BMODE_NAND:
- setenv("modeboot", "nandboot");
- break;
- default:
- setenv("modeboot", "");
- break;
- }
-
if (is_mx6ul()) {
#ifdef CONFIG_ENV_IS_IN_MMC
setenv("fdt_file", "imx6ul-isiot-emmc.dtb");
@@ -126,8 +107,6 @@
setenv("fdt_file", "imx6ul-isiot-nand.dtb");
#endif
}
-
- return 0;
}
#ifdef CONFIG_SPL_BUILD