MLK-22105-2 caam: Move g_jrdata to bss section for SPL
authorYe Li <ye.li@nxp.com>
Tue, 25 Jun 2019 09:21:36 +0000 (02:21 -0700)
committerYe Li <ye.li@nxp.com>
Wed, 26 Jun 2019 05:59:43 +0000 (22:59 -0700)
We set SPL bss section on OCRAM. So move the g_jrdata to bss section
only on SPL. In normal u-boot, it is still in data section to avoid
overlay with relocation entries and DTB.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 53cc1a63d672882cb8c71af61321051f4dcbe091)

drivers/crypto/fsl_caam.c

index a513ba1..547b41a 100644 (file)
@@ -76,7 +76,11 @@ struct jr_data_st {
 /*
  * Global variables
  */
+#if defined(CONFIG_SPL_BUILD)
+static struct jr_data_st g_jrdata = {0};
+#else
 static struct jr_data_st g_jrdata = {0, 0, 0xFFFFFFFF};
+#endif
 
 static u8 skeymod[] = {
        0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,