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>
Mon, 2 Apr 2018 02:41:33 +0000 (19:41 -0700)
commita091145c41fea25d7532cb4791257e22b7b40317
tree4aab3ca42e72b210309dfdc69f343862e52e525c
parent1d7f31a55b284ea5bf206ea30e07cc96c851c6ec
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)
cmd/blob.c
include/fsl_sec.h