From patchwork Tue May 26 23:33:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 246647 List-Id: U-Boot discussion From: festevam at gmail.com (Fabio Estevam) Date: Tue, 26 May 2020 20:33:48 -0300 Subject: [PATCH v3 3/5] imx8mp_evk: spl: use spl_early_init In-Reply-To: <20200526233350.25190-1-festevam@gmail.com> References: <20200526233350.25190-1-festevam@gmail.com> Message-ID: <20200526233350.25190-3-festevam@gmail.com> From: Peng Fan 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 Signed-off-by: Fabio Estevam --- Changes since v2: - None. Rebased against U-Boot master board/freescale/imx8mp_evk/spl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 3b3112077a..6fc3df5aee 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -118,17 +118,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);