summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8
diff options
context:
space:
mode:
authorSilvano di Ninno <silvano.dininno@nxp.com>2020-01-29 17:52:00 +0100
committerSilvano di Ninno <silvano.dininno@nxp.com>2020-02-05 20:59:53 +0100
commitf260fade38a7f03af019682c392b671bd77d69d1 (patch)
tree6d53abd06cd3c514ef82a9e920274db122a01883 /arch/arm/mach-imx/imx8
parent914a03e8d2f069cfd558f853843b875d097100f8 (diff)
TEE-502 imx: refactor optee bindings addition
- Remove code duplication betwee imx8 and imx8m support - add reserved memory node to prevent Linux accessing optee reserved memory Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 8beac7ef22c16b72ad337b44a0516436a4a0d00c)
Diffstat (limited to 'arch/arm/mach-imx/imx8')
-rw-r--r--arch/arm/mach-imx/imx8/cpu.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 2cda814d5e..f17b9b01d3 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -13,6 +13,7 @@
#include <dm/uclass-internal.h>
#include <asm/mach-imx/sci/sci.h>
#include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/optee.h>
#include <asm/arch/clock.h>
#include <thermal.h>
#include <asm/armv8/mmu.h>
@@ -1383,54 +1384,6 @@ static int config_smmu_fdt(void *blob)
#endif
#ifdef CONFIG_OF_SYSTEM_SETUP
-static int ft_add_optee_node(void *fdt, bd_t *bd)
-{
- const char *path, *subpath;
- int offs;
-
- /*
- * No TEE space allocated indicating no TEE running, so no
- * need to add optee node in dts
- */
- if (!rom_pointer[1])
- return 0;
-
- offs = fdt_increase_size(fdt, 512);
- if (offs) {
- printf("No Space for dtb\n");
- return 1;
- }
-
- path = "/firmware";
- offs = fdt_path_offset(fdt, path);
- if (offs < 0) {
- path = "/";
- offs = fdt_path_offset(fdt, path);
-
- if (offs < 0) {
- printf("Could not find root node.\n");
- return 1;
- }
-
- subpath = "firmware";
- offs = fdt_add_subnode(fdt, offs, subpath);
- if (offs < 0) {
- printf("Could not create %s node.\n", subpath);
- }
- }
-
- subpath = "optee";
- offs = fdt_add_subnode(fdt, offs, subpath);
- if (offs < 0) {
- printf("Could not create %s node.\n", subpath);
- }
-
- fdt_setprop_string(fdt, offs, "compatible", "linaro,optee-tz");
- fdt_setprop_string(fdt, offs, "method", "smc");
-
- return 0;
-}
-
int ft_system_setup(void *blob, bd_t *bd)
{
#if (CONFIG_BOOTAUX_RESERVED_MEM_SIZE != 0x00)