security engine (SEC) in ls1021 and what needs to be done to enable it?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

security engine (SEC) in ls1021 and what needs to be done to enable it?

995 Views
dhruvalpatel
Contributor I

Does LS1021 has a security engine for handling cryptographic processing? Like for P2020 we use CONFIG_CRYPTO_DEV_TALITOS kernel option to enable hardware cryptographic support. 

I tried to do enable it for ls1021 and it didn't like it.

drivers/crypto/talitos.c: In function 'reset_channel':
| drivers/crypto/talitos.c:97:2: error: implicit declaration of function 'in_be32' [-Werror=implicit-function-declaration]
| while ((in_be32(priv->chan[ch].reg + TALITOS_CCCR) & TALITOS_CCCR_RESET)
| ^
| drivers/crypto/talitos.c: In function 'talitos_submit':
| drivers/crypto/talitos.c:232:2: error: implicit declaration of function 'out_be32' [-Werror=implicit-function-declaration]
| out_be32(priv->chan[ch].reg + TALITOS_FF,
| ^
| drivers/crypto/talitos.c: In function 'talitos_remove':
| drivers/crypto/talitos.c:2872:4: error: implicit declaration of function 'irq_dispose_mapping' [-Werror=implicit-function-declaration]
| irq_dispose_mapping(priv->irq[i]);
| ^
| drivers/crypto/talitos.c: In function 'talitos_probe_irq':
| drivers/crypto/talitos.c:2985:2: error: implicit declaration of function 'irq_of_parse_and_map' [-Werror=implicit-function-declaration]
| priv->irq[0] = irq_of_parse_and_map(np, 0);
| ^
| drivers/crypto/talitos.c: In function 'talitos_probe':
| drivers/crypto/talitos.c:3102:2: error: implicit declaration of function 'of_iomap' [-Werror=implicit-function-declaration]
| priv->reg = of_iomap(np, 0);
| ^
| drivers/crypto/talitos.c:3102:12: warning: assignment makes pointer from integer without a cast [enabled by default]
| priv->reg = of_iomap(np, 0);
| ^
| CC net/core/datagram.o
| cc1: some warnings being treated as errors
| make[2]: *** [drivers/crypto/talitos.o] Error 1
| make[1]: *** [drivers/crypto] Error 2
| make: *** [drivers] Error 2
| make: *** Waiting for unfinished jobs....

Please let me know if there is a cryptographic engine that we can enable on ls1021 to offload CPU. I will appreciate any pointers 

Thanks in Advance !!!!

Labels (1)
0 Kudos
1 Reply

704 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Dhruval Patel,

LS1021A is compatible with SEC 5.x, the software driver module for SEC hardware should be "CAAM", please use the Kernel option CONFIG_CRYPTO_DEV_FSL_CAAM, please refer to the following Kernel configuration for SEC related options in the default LS1021A Kernel configuration file provided in Linux SDK.

CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_LE=y
CONFIG_ARM_CRYPTO=y
CONFIG_CRYPTO_SHA1_ARM_NEON=y
CONFIG_CRYPTO_SHA256_ARM=y
CONFIG_CRYPTO_SHA512_ARM_NEON=y
CONFIG_CRYPTO_AES_ARM_BS=y
CONFIG_CRC_CCITT=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC7=m


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos