summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/fdt.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-03-18 09:22:49 +0100
committerPatrick Delaunay <patrick.delaunay@st.com>2020-05-14 09:02:12 +0200
commit43df0a159df6ef4c627553915634cd3d961d4da8 (patch)
tree698bab2f1c71d24866daffc5e16b39ed6846c2a9 /arch/arm/mach-stm32mp/fdt.c
parent4a1b975dac0270f553f5a58b0e7d809c8c8ef61f (diff)
stm32mp1: dynamically detect op-tee presence
Activate OP-TEE driver for trusted and optee defconfig. This driver allows detection of TEE presence for boot from flash; CONFIG_STM32MP1_OPTEE is also removed. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/fdt.c')
-rw-r--r--arch/arm/mach-stm32mp/fdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/fdt.c b/arch/arm/mach-stm32mp/fdt.c
index ae82270e42..21b5f09728 100644
--- a/arch/arm/mach-stm32mp/fdt.c
+++ b/arch/arm/mach-stm32mp/fdt.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fdt_support.h>
+#include <tee.h>
#include <asm/arch/sys_proto.h>
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
#include <linux/io.h>
@@ -322,7 +323,8 @@ int ft_system_setup(void *blob, bd_t *bd)
"st,package", pkg, false);
}
- if (!CONFIG_IS_ENABLED(STM32MP1_OPTEE))
+ if (!CONFIG_IS_ENABLED(OPTEE) ||
+ !tee_find_device(NULL, NULL, NULL, NULL))
stm32_fdt_disable_optee(blob);
return ret;