summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvano di Ninno <silvano.dininno@nxp.com>2020-02-05 15:47:24 +0100
committerSilvano di Ninno <silvano.dininno@nxp.com>2020-03-27 12:22:09 +0100
commitb067e6d30f8272f3cea192888c220ea0256f7510 (patch)
treeac0f820b23e60edcde0f1cbbb7e7f2ea5cd90b89
parentc029ba154e257e5b886c279630681a5e7ce3d3de (diff)
TEE-532-7 plat: imx8dx: Add support for BL32
8DX and 8QX share the same die, so will reuse the same implementation Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com> (cherry picked from commit bb209a0b4ccca2aa4a3a887f9606dc4a3d294adf)
-rw-r--r--plat/imx/common/imx8_helpers.S2
-rw-r--r--plat/imx/common/imx_sip_handler.c6
-rw-r--r--plat/imx/common/imx_sip_svc.c2
-rw-r--r--plat/imx/common/include/imx_sip_svc.h2
l---------plat/imx/imx8dx1
-rw-r--r--plat/imx/imx8qx/platform.mk4
6 files changed, 11 insertions, 6 deletions
diff --git a/plat/imx/common/imx8_helpers.S b/plat/imx/common/imx8_helpers.S
index be50b12e..c564e772 100644
--- a/plat/imx/common/imx8_helpers.S
+++ b/plat/imx/common/imx8_helpers.S
@@ -149,7 +149,7 @@ endfunc plat_reset_handler
*/
func plat_get_my_entrypoint
-#if defined(PLAT_imx8qx) || defined(PLAT_imx8qm) || defined(PLAT_imx8dxl)
+#if defined(PLAT_imx8qx)|| defined(PLAT_imx8dx) || defined(PLAT_imx8qm) || defined(PLAT_imx8dxl)
/* ---------------------------------------------
* SCU will signal through a GIR bit when a
* partition boot has taken place which requires
diff --git a/plat/imx/common/imx_sip_handler.c b/plat/imx/common/imx_sip_handler.c
index d715e787..de968c37 100644
--- a/plat/imx/common/imx_sip_handler.c
+++ b/plat/imx/common/imx_sip_handler.c
@@ -14,7 +14,7 @@
#include <imx_sip_svc.h>
#include <sci/sci.h>
-#if defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dxl)
+#if defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dx) || defined(PLAT_imx8dxl)
#ifdef PLAT_imx8qm
const static int ap_cluster_index[PLATFORM_CLUSTER_COUNT] = {
@@ -96,7 +96,7 @@ static void imx_cpufreq_set_target(uint32_t cluster_id, unsigned long freq)
#ifdef PLAT_imx8qm
sc_pm_set_clock_rate(ipc_handle, ap_cluster_index[cluster_id], SC_PM_CLK_CPU, &rate);
#endif
-#if defined(PLAT_imx8qx) || defined(PLAT_imx8dxl)
+#if defined(PLAT_imx8qx) || defined(PLAT_imx8dx) || defined(PLAT_imx8dxl)
sc_pm_set_clock_rate(ipc_handle, SC_R_A35, SC_PM_CLK_CPU, &rate);
#endif
}
@@ -195,7 +195,7 @@ int imx_get_cpu_rev(uint32_t *cpu_id, uint32_t *cpu_rev)
return 0;
}
-#endif /* defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dxl) */
+#endif /* defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dx) || defined(PLAT_imx8qm) || defined(PLAT_imx8dxl) */
static uint64_t imx_get_commit_hash(u_register_t x2,
u_register_t x3,
diff --git a/plat/imx/common/imx_sip_svc.c b/plat/imx/common/imx_sip_svc.c
index 8e2a6002..23f561b9 100644
--- a/plat/imx/common/imx_sip_svc.c
+++ b/plat/imx/common/imx_sip_svc.c
@@ -58,7 +58,7 @@ static uintptr_t imx_sip_handler(unsigned int smc_fid,
SMC_RET1(handle, imx_hab_handler(smc_fid, x1, x2, x3, x4));
break;
#endif
-#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dxl))
+#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dx) || defined(PLAT_imx8dxl))
case IMX_SIP_SRTC:
return imx_srtc_handler(smc_fid, handle, x1, x2, x3, x4);
case IMX_SIP_CPUFREQ:
diff --git a/plat/imx/common/include/imx_sip_svc.h b/plat/imx/common/include/imx_sip_svc.h
index 16de0fc5..e3e36e3e 100644
--- a/plat/imx/common/include/imx_sip_svc.h
+++ b/plat/imx/common/include/imx_sip_svc.h
@@ -87,7 +87,7 @@ int imx_hab_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3, u_register_t x4);
#endif
-#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dxl))
+#if (defined(PLAT_imx8qm) || defined(PLAT_imx8qx) || defined(PLAT_imx8dx) || defined(PLAT_imx8dxl))
int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1,
u_register_t x2, u_register_t x3);
int imx_srtc_handler(uint32_t smc_fid, void *handle, u_register_t x1,
diff --git a/plat/imx/imx8dx b/plat/imx/imx8dx
new file mode 120000
index 00000000..116fc7d6
--- /dev/null
+++ b/plat/imx/imx8dx
@@ -0,0 +1 @@
+imx8qx/ \ No newline at end of file
diff --git a/plat/imx/imx8qx/platform.mk b/plat/imx/imx8qx/platform.mk
index 269e78a6..435240f8 100644
--- a/plat/imx/imx8qx/platform.mk
+++ b/plat/imx/imx8qx/platform.mk
@@ -41,7 +41,11 @@ $(eval $(call add_define,ENABLE_CPU_DYNAMIC_RETENTION))
ENABLE_L2_DYNAMIC_RETENTION := 1
$(eval $(call add_define,ENABLE_L2_DYNAMIC_RETENTION))
+ifeq (${PLAT},imx8dx)
+BL32_BASE ?= 0x96000000
+else
BL32_BASE ?= 0xfe000000
+endif
$(eval $(call add_define,BL32_BASE))
BL32_SIZE ?= 0x2000000