MLK-17915: cmd: blob: Instantiate RNG before running CMD_BLOB
authorBreno Lima <breno.lima@nxp.com>
Fri, 23 Mar 2018 20:05:47 +0000 (17:05 -0300)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:27:18 +0000 (02:27 -0700)
commit1339300cba26dc32289633c3a8c2cc86a1180949
treef8cf5f5f0e3b057a3c9f10ad2650ee090df8963a
parentc9de383878c5e248ae549182a9f2477f5bb2a5f5
MLK-17915: cmd: blob: Instantiate RNG before running CMD_BLOB

U-Boot can instantiate CAAM RNG if needed by crypto operations.
Call sec_init() prior running a blob operation to ensure
RNG is correctly instantiated.

Make sure CAAM clock is enabled and check if a job ring is
available for that operation.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b2b745515d06f05ea288524e26cf2389d6924ff2)
(cherry picked from commit fe33f7296336b7364fb24ad21b0be32eb5810262)
cmd/blob.c
include/fsl_sec.h