Commit 52384b7e5c6c8229329138f83e2305675e13a98a

Authored by Breno Lima
Committed by Stefano Babic
1 parent 051ba9e082

imx: Kconfig: Add HAS_CAAM option

Currently CONFIG_SECURE_BOOT is selecting FSL_CAAM for all i.MX devices,
this causes the following error when building mx6sl boards since
this SoC doesn't have the CAAM block:

In file included from drivers/crypto/fsl/jobdesc.c:12:0:
drivers/crypto/fsl/jobdesc.c: In function 'inline_cnstr_jobdesc_blob_dek':
include/fsl_sec.h:268:25: error: 'CAAM_ARB_BASE_ADDR' undeclared (first use
in this function)
 #define SEC_MEM_PAGE1  (CAAM_ARB_BASE_ADDR + 0x1000)
                         ^
drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
  memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
                     ^
include/fsl_sec.h:268:25: note: each undeclared identifier is reported only
once for each function it appears in
 #define SEC_MEM_PAGE1  (CAAM_ARB_BASE_ADDR + 0x1000)
                         ^
drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
  memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
                     ^
scripts/Makefile.build:280: recipe for target 'drivers/crypto/fsl/jobdesc.o'
failed
make[3]: *** [drivers/crypto/fsl/jobdesc.o] Error 1
scripts/Makefile.build:425: recipe for target 'drivers/crypto/fsl' failed
make[2]: *** [drivers/crypto/fsl] Error 2
scripts/Makefile.build:425: recipe for target 'drivers/crypto' failed
make[1]: *** [drivers/crypto] Error 2

Add HAS_CAAM configuration to avoid this error.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

Showing 3 changed files with 12 additions and 1 deletions Side-by-side Diff

arch/arm/mach-imx/Kconfig
  1 +config HAS_CAAM
  2 + bool
  3 +
1 4 config IMX_CONFIG
2 5 string
3 6  
... ... @@ -28,7 +31,7 @@
28 31 config SECURE_BOOT
29 32 bool "Support i.MX HAB features"
30 33 depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
31   - select FSL_CAAM
  34 + select FSL_CAAM if HAS_CAAM
32 35 imply CMD_DEKBLOB
33 36 help
34 37 This option enables the support for secure boot (HAB).
arch/arm/mach-imx/mx6/Kconfig
... ... @@ -14,28 +14,34 @@
14 14 imply CMD_FUSE
15 15  
16 16 config MX6D
  17 + select HAS_CAAM
17 18 select MX6_SMP
18 19 bool
19 20  
20 21 config MX6DL
  22 + select HAS_CAAM
21 23 select MX6_SMP
22 24 bool
23 25  
24 26 config MX6Q
  27 + select HAS_CAAM
25 28 select MX6_SMP
26 29 bool
27 30  
28 31 config MX6QDL
  32 + select HAS_CAAM
29 33 select MX6_SMP
30 34 bool
31 35  
32 36 config MX6S
  37 + select HAS_CAAM
33 38 bool
34 39  
35 40 config MX6SL
36 41 bool
37 42  
38 43 config MX6SX
  44 + select HAS_CAAM
39 45 select ROM_UNIFIED_SECTIONS
40 46 bool
41 47  
... ... @@ -44,6 +50,7 @@
44 50 bool
45 51  
46 52 config MX6UL
  53 + select HAS_CAAM
47 54 select SYS_L2CACHE_OFF
48 55 select ROM_UNIFIED_SECTIONS
49 56 bool
arch/arm/mach-imx/mx7/Kconfig
... ... @@ -10,6 +10,7 @@
10 10 default y
11 11  
12 12 config MX7D
  13 + select HAS_CAAM
13 14 select ROM_UNIFIED_SECTIONS
14 15 imply CMD_FUSE
15 16 bool