]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8mp_evk: spl: use spl_early_init
authorPeng Fan <peng.fan@nxp.com>
Tue, 26 May 2020 23:33:48 +0000 (20:33 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 8 Jun 2020 08:42:35 +0000 (10:42 +0200)
Use spl_early_init to replace spl_init, spl_init will be invoked
in board_init_r, we only need use spl_early_init to setup malloc
and scan early dt.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
board/freescale/imx8mp_evk/spl.c

index f45f935b9345f3a11d3f485b4ce35cd17a973f01..d4feb84d93e46706b40196295898be49b373c6fa 100644 (file)
@@ -114,17 +114,17 @@ void board_init_f(ulong dummy)
 
        board_early_init_f();
 
-       preloader_console_init();
-
-       /* Clear the BSS. */
-       memset(__bss_start, 0, __bss_end - __bss_start);
-
-       ret = spl_init();
+       ret = spl_early_init();
        if (ret) {
                debug("spl_init() failed: %d\n", ret);
                hang();
        }
 
+       preloader_console_init();
+
+       /* Clear the BSS. */
+       memset(__bss_start, 0, __bss_end - __bss_start);
+
        enable_tzc380();
 
        setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);