diff mbox series

[U-Boot,v4,1/8] mx7_common: Share configs to skip low level init

Message ID 1557297516-18616-2-git-send-email-jun.nie@linaro.org
State Accepted
Commit 3ad0d26878430f235d1c189e179e6891f5513639
Delegated to: Stefano Babic
Headers show
Series pico-imx7d: Add support for BL33 case | expand

Commit Message

Jun Nie May 8, 2019, 6:38 a.m. UTC
Share configs in mx7 to skip low level init if we are in the case where
OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
the low level initialization is already done and that we may/should skip
it doing them here.

Fix the definition detection with size detection to decide whether to skip
it.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 include/configs/mx7_common.h | 11 +++++++++++
 include/configs/warp7.h      | 11 -----------
 2 files changed, 11 insertions(+), 11 deletions(-)

Comments

Fabio Estevam May 30, 2019, 11:53 p.m. UTC | #1
Hi Jun,

Please add Stefano Babic on your imx patches.

On Wed, May 8, 2019 at 3:39 AM Jun Nie <jun.nie@linaro.org> wrote:
>
> Share configs in mx7 to skip low level init if we are in the case where
> OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
> the low level initialization is already done and that we may/should skip
> it doing them here.
>
> Fix the definition detection with size detection to decide whether to skip
> it.
>
> Signed-off-by: Jun Nie <jun.nie@linaro.org>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Stefano Babic June 10, 2019, 9:41 a.m. UTC | #2
> Share configs in mx7 to skip low level init if we are in the case where
> OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
> the low level initialization is already done and that we may/should skip
> it doing them here.
> Fix the definition detection with size detection to decide whether to skip
> it.
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index cc7e872..57fbec7 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -54,4 +54,15 @@ 
 #endif
 #endif
 
+/*
+ * If we have defined the OPTEE ram size and not OPTEE it means that we were
+ * launched by OPTEE, because of that we shall skip all the low level
+ * initialization since it was already done by ATF or OPTEE
+ */
+#if (CONFIG_OPTEE_TZDRAM_SIZE != 0)
+#ifndef CONFIG_OPTEE
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#endif
+#endif
+
 #endif
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 37649cf..742f390 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -13,17 +13,6 @@ 
 
 #define PHYS_SDRAM_SIZE			SZ_512M
 
-/*
- * If we have defined the OPTEE ram size and not OPTEE it means that we were
- * launched by OPTEE, because of that we shall skip all the low level
- * initialization since it was already done by ATF or OPTEE
- */
-#ifdef CONFIG_OPTEE_TZDRAM_SIZE
-#ifndef CONFIG_OPTEE
-#define CONFIG_SKIP_LOWLEVEL_INIT
-#endif
-#endif
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(35 * SZ_1M)