summaryrefslogtreecommitdiff
path: root/include/configs/mx7_common.h
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2019-05-08 14:38:29 +0800
committerStefano Babic <sbabic@denx.de>2019-06-11 10:42:48 +0200
commit3ad0d26878430f235d1c189e179e6891f5513639 (patch)
treef9fa8e4377be041fde7ddfc7ebd7959e0e8c8ded /include/configs/mx7_common.h
parent7a3faf31a7c2db55494b6af782b7a6cc7e7e8fe2 (diff)
mx7_common: Share configs to skip low level init
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>
Diffstat (limited to 'include/configs/mx7_common.h')
-rw-r--r--include/configs/mx7_common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index f3167c51d4..4f822ef9a0 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