crypto/caam_jr: fix device tree parsing for SEC_ERA
authorGagandeep Singh <g.singh@nxp.com>
Mon, 19 Oct 2020 09:48:01 +0000 (17:48 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 19 Oct 2020 14:00:31 +0000 (16:00 +0200)
commitc6887eca58ac0aeb2aa54b58d881d1bbf5543d96
tree02e27e514faab3392bfc30a8259bb705a59f9b67
parentdc7a7b5cb882f083d8120c755cd497d6c54d8635
crypto/caam_jr: fix device tree parsing for SEC_ERA

Previously, SEC_ERA was hardcoded and it was removed in [1].
Now when that hardcoded was removed, it is supposed to be
read from the device tree but it is not done correctly.
This patch calls a necessary API of_init() before using any
of_* APIs to retrieve information from the device tree and
if reading integer value that must be converted to cpu endianness
before using it.

[1] eef9e0412a84 ("drivers/crypto: fix build with -fno-common")

Fixes: 1d678de329ab ("crypto/caam_jr: add basic job ring routines")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/caam_jr/caam_jr.c