diff options
author | Ye Li <ye.li@nxp.com> | 2019-06-25 02:14:00 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2019-06-25 02:25:53 -0700 |
commit | 35a24430c2da7c687bc729fa7f0b4b45749aba34 (patch) | |
tree | a2a4093662223df0710d3b62ee7c2d61c6ec4dd9 /drivers | |
parent | f850d467db9cf3b9b58688b96f1b4d9d8632b07d (diff) |
MLK-22105-1 Revert "MLK-20026 caam: Fix CAAM RNG init hang on imx8mq RevA"
This reverts commit b12e170792c918efc7c371f86989d34fc397fe06.
The original patch has issue due to the early malloc pool is not ready
at this phase. So malloc always return NULL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/fsl_caam.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/crypto/fsl_caam.c b/drivers/crypto/fsl_caam.c index 2ed4951cb4..9291e39480 100644 --- a/drivers/crypto/fsl_caam.c +++ b/drivers/crypto/fsl_caam.c @@ -418,22 +418,15 @@ static int do_cfg_jrqueue(void) g_jrdata.status = RING_RELOC_INIT; } else { u32 align_idx = 0; - u32 *addr; -#if defined(CONFIG_SPL_BUILD) && CONFIG_VAL(SYS_MALLOC_F_LEN) - ulong maddr = (ulong)malloc(DESC_MAX_SIZE * 2 + 8); - addr = (u32*)ALIGN(maddr, 8); -#else - addr = g_jrdata.raw_addr; -#endif /* Ensure 64bits buffers addresses alignment */ - if ((uintptr_t)addr & 0x7) + if ((uintptr_t)g_jrdata.raw_addr & 0x7) align_idx = 1; g_jrdata.inrings = (struct inring_entry *) - (&addr[align_idx]); + (&g_jrdata.raw_addr[align_idx]); g_jrdata.outrings = (struct outring_entry *) - (&addr[align_idx + 2]); - g_jrdata.desc = (u32 *)(&addr[align_idx + 4]); + (&g_jrdata.raw_addr[align_idx + 2]); + g_jrdata.desc = (u32 *)(&g_jrdata.raw_addr[align_idx + 4]); g_jrdata.status = RING_EARLY_INIT; } |