mbox series

[v4,0/7] Add SPAcc Crypto Driver Support

Message ID 20240618042750.485720-1-pavitrakumarm@vayavyalabs.com
Headers show
Series Add SPAcc Crypto Driver Support | expand

Message

Pavitrakumar Managutte June 18, 2024, 4:27 a.m. UTC
Add the driver for SPAcc(Security Protocol Accelerator), which is a
crypto acceleration IP from Synopsys. The SPAcc supports many cipher,
hash, aead algorithms and 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 M (7):
  Add SPAcc Skcipher support
  Enable SPAcc AUTODETECT
  Add SPAcc ahash support
  Add SPAcc aead support
  Add SPAcc Kconfig and Makefile
  Add SPAcc dts overlay
  Enable Driver compilation in crypto Kconfig and Makefile

 arch/arm64/boot/dts/xilinx/Makefile           |    3 +
 .../arm64/boot/dts/xilinx/snps-dwc-spacc.dtso |   35 +
 drivers/crypto/Kconfig                        |    1 +
 drivers/crypto/Makefile                       |    1 +
 drivers/crypto/dwc-spacc/Kconfig              |   95 +
 drivers/crypto/dwc-spacc/Makefile             |   16 +
 drivers/crypto/dwc-spacc/spacc_aead.c         | 1279 ++++++++
 drivers/crypto/dwc-spacc/spacc_ahash.c        |  883 ++++++
 drivers/crypto/dwc-spacc/spacc_core.c         | 2624 +++++++++++++++++
 drivers/crypto/dwc-spacc/spacc_core.h         |  826 ++++++
 drivers/crypto/dwc-spacc/spacc_device.c       |  339 +++
 drivers/crypto/dwc-spacc/spacc_device.h       |  236 ++
 drivers/crypto/dwc-spacc/spacc_hal.c          |  367 +++
 drivers/crypto/dwc-spacc/spacc_hal.h          |  113 +
 drivers/crypto/dwc-spacc/spacc_interrupt.c    |  316 ++
 drivers/crypto/dwc-spacc/spacc_manager.c      |  650 ++++
 drivers/crypto/dwc-spacc/spacc_skcipher.c     |  715 +++++
 17 files changed, 8499 insertions(+)
 create mode 100644 arch/arm64/boot/dts/xilinx/snps-dwc-spacc.dtso
 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: 1dcf865d3bf5bff45e93cb2410911b3428dacb78

Comments

Jeff Johnson June 19, 2024, 6:17 p.m. UTC | #1
On 6/17/24 21:27, Pavitrakumar M wrote:
> Signed-off-by: shwetar <shwetar@vayavyalabs.com>
> Signed-off-by: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
> Acked-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
> ---
>   drivers/crypto/dwc-spacc/spacc_core.c      | 1241 ++++++++++++++++++++
>   drivers/crypto/dwc-spacc/spacc_core.h      |  826 +++++++++++++
>   drivers/crypto/dwc-spacc/spacc_device.c    |  339 ++++++
>   drivers/crypto/dwc-spacc/spacc_device.h    |  236 ++++
>   drivers/crypto/dwc-spacc/spacc_hal.c       |  367 ++++++
>   drivers/crypto/dwc-spacc/spacc_hal.h       |  113 ++
>   drivers/crypto/dwc-spacc/spacc_interrupt.c |  316 +++++
>   drivers/crypto/dwc-spacc/spacc_manager.c   |  650 ++++++++++
>   drivers/crypto/dwc-spacc/spacc_skcipher.c  |  715 +++++++++++
>   9 files changed, 4803 insertions(+)
>   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
> 
...

> +module_platform_driver(spacc_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Synopsys, Inc.");

Missing MODULE_DESCRIPTION()
This will cause a warning with make W=1
Pavitrakumar Managutte June 20, 2024, 9:40 a.m. UTC | #2
Thanks Jeff,
   Acked, I will add it to v5.

Warm Regards,
PK


On Wed, Jun 19, 2024 at 11:48 PM Jeff Johnson <quic_jjohnson@quicinc.com> wrote:
>
> On 6/17/24 21:27, Pavitrakumar M wrote:
> > Signed-off-by: shwetar <shwetar@vayavyalabs.com>
> > Signed-off-by: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
> > Acked-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
> > ---
> >   drivers/crypto/dwc-spacc/spacc_core.c      | 1241 ++++++++++++++++++++
> >   drivers/crypto/dwc-spacc/spacc_core.h      |  826 +++++++++++++
> >   drivers/crypto/dwc-spacc/spacc_device.c    |  339 ++++++
> >   drivers/crypto/dwc-spacc/spacc_device.h    |  236 ++++
> >   drivers/crypto/dwc-spacc/spacc_hal.c       |  367 ++++++
> >   drivers/crypto/dwc-spacc/spacc_hal.h       |  113 ++
> >   drivers/crypto/dwc-spacc/spacc_interrupt.c |  316 +++++
> >   drivers/crypto/dwc-spacc/spacc_manager.c   |  650 ++++++++++
> >   drivers/crypto/dwc-spacc/spacc_skcipher.c  |  715 +++++++++++
> >   9 files changed, 4803 insertions(+)
> >   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
> >
> ...
>
> > +module_platform_driver(spacc_driver);
> > +
> > +MODULE_LICENSE("GPL");
> > +MODULE_AUTHOR("Synopsys, Inc.");
>
> Missing MODULE_DESCRIPTION()
> This will cause a warning with make W=1
>
>
Geert Uytterhoeven Aug. 20, 2024, 9:28 a.m. UTC | #3
Hi Pavitrakumar,

CC devicetree

On Tue, 18 Jun 2024, Pavitrakumar M wrote:
> Add the driver for SPAcc(Security Protocol Accelerator), which is a
> crypto acceleration IP from Synopsys. The SPAcc supports many cipher,
> hash, aead algorithms and various modes.The driver currently supports
> below,

[...]

> Pavitrakumar M (7):
>  Add SPAcc Skcipher support
>  Enable SPAcc AUTODETECT
>  Add SPAcc ahash support
>  Add SPAcc aead support
>  Add SPAcc Kconfig and Makefile
>  Add SPAcc dts overlay
>  Enable Driver compilation in crypto Kconfig and Makefile

Thanks for your series, of which all but the dts patches have been
applied to the crypto tree (commits fc61c658c94cb740 ("crypto: spacc -
Enable Driver compilation in crypto Kconfig and Makefile") and before).

This driver uses device tree, but lacks DT bindings, which are a
requirement for new DT drivers.  So please provide DT bindings.

Gr{oetje,eeting}s,

 						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
 							    -- Linus Torvalds