Skip to content

Commit 14fa93c

Browse files
Srikanth Jampalaherbertx
authored andcommitted
crypto: cavium - Add support for CNN55XX adapters.
Add Physical Function driver support for CNN55XX crypto adapters. CNN55XX adapters belongs to Cavium NITROX family series, which accelerate both Symmetric and Asymmetric crypto workloads. These adapters have crypto engines that need firmware to become operational. Signed-off-by: Srikanth Jampala <Jampala.Srikanth@cavium.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 3bca64c commit 14fa93c

13 files changed

Lines changed: 4002 additions & 0 deletions

File tree

‎drivers/crypto/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ config CRYPTO_DEV_MXS_DCP
541541

542542
source "drivers/crypto/qat/Kconfig"
543543
source "drivers/crypto/cavium/cpt/Kconfig"
544+
source "drivers/crypto/cavium/nitrox/Kconfig"
544545

545546
config CRYPTO_DEV_CAVIUM_ZIP
546547
tristate "Cavium ZIP driver"

‎drivers/crypto/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ obj-$(CONFIG_CRYPTO_DEV_CAVIUM_ZIP) += cavium/
66
obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/
77
obj-$(CONFIG_CRYPTO_DEV_CHELSIO) += chelsio/
88
obj-$(CONFIG_CRYPTO_DEV_CPT) += cavium/cpt/
9+
obj-$(CONFIG_CRYPTO_DEV_NITROX) += cavium/nitrox/
910
obj-$(CONFIG_CRYPTO_DEV_EXYNOS_RNG) += exynos-rng.o
1011
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += caam/
1112
obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Cavium NITROX Crypto Device configuration
3+
#
4+
config CRYPTO_DEV_NITROX
5+
tristate
6+
select CRYPTO_BLKCIPHER
7+
select CRYPTO_AES
8+
select CRYPTO_DES
9+
select FW_LOADER
10+
11+
config CRYPTO_DEV_NITROX_CNN55XX
12+
tristate "Support for Cavium CNN55XX driver"
13+
depends on PCI_MSI && 64BIT
14+
select CRYPTO_DEV_NITROX
15+
default m
16+
help
17+
Support for Cavium NITROX family CNN55XX driver
18+
for accelerating crypto workloads.
19+
20+
To compile this as a module, choose M here: the module
21+
will be called n5pf.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
obj-$(CONFIG_CRYPTO_DEV_NITROX_CNN55XX) += n5pf.o
2+
3+
n5pf-objs := nitrox_main.o \
4+
nitrox_isr.o \
5+
nitrox_lib.o \
6+
nitrox_hal.o \
7+
nitrox_reqmgr.o
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#ifndef __NITROX_COMMON_H
2+
#define __NITROX_COMMON_H
3+
4+
#include "nitrox_dev.h"
5+
#include "nitrox_req.h"
6+
7+
void nitrox_pf_cleanup_isr(struct nitrox_device *ndev);
8+
int nitrox_pf_init_isr(struct nitrox_device *ndev);
9+
10+
int nitrox_common_sw_init(struct nitrox_device *ndev);
11+
void nitrox_common_sw_cleanup(struct nitrox_device *ndev);
12+
13+
void pkt_slc_resp_handler(unsigned long data);
14+
int nitrox_process_se_request(struct nitrox_device *ndev,
15+
struct se_crypto_request *req,
16+
completion_t cb,
17+
struct skcipher_request *skreq);
18+
void backlog_qflush_work(struct work_struct *work);
19+
20+
void nitrox_config_emu_unit(struct nitrox_device *ndev);
21+
void nitrox_config_pkt_input_rings(struct nitrox_device *ndev);
22+
void nitrox_config_pkt_solicit_ports(struct nitrox_device *ndev);
23+
void nitrox_config_vfmode(struct nitrox_device *ndev, int mode);
24+
void nitrox_config_nps_unit(struct nitrox_device *ndev);
25+
void nitrox_config_pom_unit(struct nitrox_device *ndev);
26+
void nitrox_config_rand_unit(struct nitrox_device *ndev);
27+
void nitrox_config_efl_unit(struct nitrox_device *ndev);
28+
void nitrox_config_bmi_unit(struct nitrox_device *ndev);
29+
void nitrox_config_bmo_unit(struct nitrox_device *ndev);
30+
void nitrox_config_lbc_unit(struct nitrox_device *ndev);
31+
void invalidate_lbc(struct nitrox_device *ndev);
32+
void enable_pkt_input_ring(struct nitrox_device *ndev, int ring);
33+
void enable_pkt_solicit_port(struct nitrox_device *ndev, int port);
34+
35+
#endif /* __NITROX_COMMON_H */

0 commit comments

Comments
 (0)