Add the driver for SPAcc(Security Protocol Accelerator), which is a crypto acceleration IP from Synopsys. The SPAcc supports multiple ciphers, hashes and AEAD algorithms with various modes. The driver currently supports below AEAD: - ccm(sm4) - ccm(aes) - gcm(sm4) - gcm(aes) - rfc7539(chacha20,poly1305) cipher: - cbc(sm4) - ecb(sm4) - ctr(sm4) - xts(sm4) - cts(cbc(sm4)) - cbc(aes) - ecb(aes) - xts(aes) - cts(cbc(aes)) - ctr(aes) - chacha20 - ecb(des) - cbc(des) - ecb(des3_ede) - cbc(des3_ede) hash: - cmac(aes) - xcbc(aes) - cmac(sm4) - xcbc(sm4) - hmac(md5) - md5 - hmac(sha1) - sha1 - sha224 - sha256 - sha384 - sha512 - hmac(sha224) - hmac(sha256) - hmac(sha384) - hmac(sha512) - sha3-224 - sha3-256 - sha3-384 - sha3-512 - hmac(sm3) - sm3 - michael_mic Pavitrakumar Managutte (6): dt-bindings: crypto: Document support for SPAcc Add SPAcc Skcipher support Add SPAcc AUTODETECT Support Add SPAcc ahash support Add SPAcc AEAD support Add SPAcc Kconfig and Makefile changelog: v1->v2 changes: - Added local_bh_disable() and local_bh_enable() for the below calls. a. for ciphers skcipher_request_complete() b. for aead aead_request_complete() c. for hash ahash_request_complete() - dt-bindings updates a. removed snps,vspacc-priority and made it into config option b. renamed snps,spacc-wdtimer to snps,spacc-internal-counter c. Added description to all properties - Updated corresponding dt-binding changes to code v2->v3 changes: - cra_init and cra_exit replaced with init_tfm and exit_tfm for hashes. - removed mutex_lock/unlock for spacc_skcipher_fallback call - dt-bindings updates a. updated SOC related information b. renamed compatible string as per SOC. - Updated corresponding dt-binding changes to code v3->v4 changes: - removed snps,vspacc-id from the dt-bindings - removed mutex_lock from ciphers - replaced magic numbers with macros - removed sw_fb variable from struct mode_tab and associated code from the hashes - polling code is replaced by wait_event_interruptible .../bindings/crypto/snps,dwc-spacc.yaml | 50 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/dwc-spacc/Kconfig | 114 + drivers/crypto/dwc-spacc/Makefile | 16 + drivers/crypto/dwc-spacc/spacc_aead.c | 1297 +++++++++ drivers/crypto/dwc-spacc/spacc_ahash.c | 968 +++++++ drivers/crypto/dwc-spacc/spacc_core.c | 2452 +++++++++++++++++ drivers/crypto/dwc-spacc/spacc_core.h | 832 ++++++ drivers/crypto/dwc-spacc/spacc_device.c | 275 ++ drivers/crypto/dwc-spacc/spacc_device.h | 230 ++ drivers/crypto/dwc-spacc/spacc_hal.c | 374 +++ drivers/crypto/dwc-spacc/spacc_hal.h | 114 + drivers/crypto/dwc-spacc/spacc_interrupt.c | 330 +++ drivers/crypto/dwc-spacc/spacc_manager.c | 611 ++++ drivers/crypto/dwc-spacc/spacc_skcipher.c | 752 +++++ 16 files changed, 8417 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/snps,dwc-spacc.yaml create mode 100644 drivers/crypto/dwc-spacc/Kconfig create mode 100644 drivers/crypto/dwc-spacc/Makefile create mode 100755 drivers/crypto/dwc-spacc/spacc_aead.c create mode 100644 drivers/crypto/dwc-spacc/spacc_ahash.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.h create mode 100644 drivers/crypto/dwc-spacc/spacc_device.c create mode 100644 drivers/crypto/dwc-spacc/spacc_device.h create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.c create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.h create mode 100644 drivers/crypto/dwc-spacc/spacc_interrupt.c create mode 100644 drivers/crypto/dwc-spacc/spacc_manager.c create mode 100644 drivers/crypto/dwc-spacc/spacc_skcipher.c base-commit: 9d9b193ed73a65ec47cf1fd39925b09da8216461 -- 2.25.1