summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-08-06 20:29:53 -0700
committerYe Li <ye.li@nxp.com>2018-08-07 05:38:31 -0700
commit02034154349f0ba54fe09cc3f2aec0bb6a14d77d (patch)
tree244de1488da632e43082a8681b070383178088fe
parent9337077a291dd9f5643160c4485a95ffb53b41fa (diff)
MLK-19138 fsl_caam: move the g_jrdata global variable to data section
The imx_sec_init is called at board_f phase, this phase forbids to write any global variable in BSS section, because the BSS section is overlay with u-boot dynamic relocation entries (or DTB) which are used during u-boot relocation after board_f phase. Now the g_jrdata is in BSS section and it is initialized during imx_sec_init. Therefore, it destroys the relocation entries (or DTB) and causes various u-boot issues. Fix the problem by assiging default value to g_jrdata.status, so g_jrdata is moved to data section. Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r--drivers/crypto/fsl_caam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/fsl_caam.c b/drivers/crypto/fsl_caam.c
index 35d1256b701..c176294774d 100644
--- a/drivers/crypto/fsl_caam.c
+++ b/drivers/crypto/fsl_caam.c
@@ -76,7 +76,7 @@ struct jr_data_st {
/*
* Global variables
*/
-static struct jr_data_st g_jrdata = {0};
+static struct jr_data_st g_jrdata = {0, 0, 0xFFFFFFFF};
static u8 skeymod[] = {
0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,