Commit e262b961d0b2fe96bbe47fbbb6d37c97280cbf02
Committed by
Ye Li
1 parent
36d279784b
Exists in
smarc-imx_v2017.03_o8.1.0_1.3.0_8m
and in
1 other branch
MLK-17917: imx-common: 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> (cherry picked from commit 9d381708210270a1cf9bf25924c8932c436967e8)
Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff
arch/arm/imx-common/cmd_dek.c
... | ... | @@ -31,7 +31,8 @@ |
31 | 31 | int ret = 0; |
32 | 32 | u32 jr_size = 4; |
33 | 33 | |
34 | - u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + 0x102c); | |
34 | + u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + | |
35 | + FSL_CAAM_ORSR_JRa_OFFSET); | |
35 | 36 | if (out_jr_size != jr_size) { |
36 | 37 | hab_caam_clock_enable(1); |
37 | 38 | sec_init(); |
arch/arm/imx-common/cmd_mfgprot.c
... | ... | @@ -43,7 +43,8 @@ |
43 | 43 | |
44 | 44 | /* Enable HAB clock */ |
45 | 45 | u32 jr_size = 4; |
46 | - u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + 0x102c); | |
46 | + u32 out_jr_size = sec_in32(CONFIG_SYS_FSL_JR0_ADDR + | |
47 | + FSL_CAAM_ORSR_JRa_OFFSET); | |
47 | 48 | |
48 | 49 | if (out_jr_size != jr_size) { |
49 | 50 | hab_caam_clock_enable(1); |