aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBreno Lima <breno.lima@nxp.com>2021-03-25 17:30:03 +0800
committerStefano Babic <sbabic@denx.de>2021-04-08 09:18:29 +0200
commit8c497e148c0676977a1ef392595fd5b790e59ee4 (patch)
tree692d5fc1e3a56e64d76aa048f090a846cfed2e4f
parent30e39ac7c937e07002e2868b23b679e6bb0f2a58 (diff)
imx: Avoid hardcoded output ring size register offset (ORSR)
The CAAM output ring size register offset is currently defined in fsl_sec.h as FSL_CAAM_ORSR_JRa_OFFSET, use this definition to avoid hardcoded value in i.MX common code. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--arch/arm/mach-imx/cmd_dek.c3
-rw-r--r--arch/arm/mach-imx/cmd_mfgprot.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index 49dd473af7..5bf92cbecf 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -28,7 +28,8 @@ static int blob_encap_dek(const u8 *src, u8 *dst, u32 len)
int ret = 0;
u32 jr_size = 4;
- u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + 0x102c);
+ u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR +
+ FSL_CAAM_ORSR_JRa_OFFSET);
if (out_jr_size != jr_size) {
hab_caam_clock_enable(1);
sec_init();
diff --git a/arch/arm/mach-imx/cmd_mfgprot.c b/arch/arm/mach-imx/cmd_mfgprot.c
index 03fc7014e1..6e567027c0 100644
--- a/arch/arm/mach-imx/cmd_mfgprot.c
+++ b/arch/arm/mach-imx/cmd_mfgprot.c
@@ -42,7 +42,8 @@ static int do_mfgprot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
/* Enable HAB clock */
u32 jr_size = 4;
- u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + 0x102c);
+ u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR +
+ FSL_CAAM_ORSR_JRa_OFFSET);
if (out_jr_size != jr_size) {
hab_caam_clock_enable(1);