devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6] crypto: Add Allwinner Security System crypto accelerator
@ 2015-03-16 19:01 LABBE Corentin
       [not found] ` <1426532482-28830-1-git-send-email-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: LABBE Corentin @ 2015-03-16 19:01 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	linux-lFZ/pmaqli7XmaaqVzeoHQ,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, arnd-r2nGTMty4D4
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hello

This is the driver for the Security System included in Allwinner SoC A20.
The Security System (SS for short) is a hardware cryptographic accelerator that
support AES/MD5/SHA1/DES/3DES/PRNG algorithms.
It could be found on others Allwinner SoC: 
- A10s, A33 and A31 diagram speak about it with precisions (AES/DES/3DES/Md5/SHA1/PRNG)
- A10 and A13 manual give the same datasheet for SS than A20
- A23 speak about a security system but without precisions
- A80 datasheet speak about a security system with more functions
  (SHA224/SHA256/RSA/CRC) but without precisions
  But I do not have access on any of those hardware, tests are welcome.

  This driver currently supports:
  - MD5 and SHA1 hash algorithms
  - AES block cipher in CBC mode with 128/196/256bits keys.
  - DES and 3DES block cipher in CBC mode
  The driver exposes all those algorithms through the kernel cryptographic API.

  The driver support only CPU driven (aka poll mode) transfer mode,
  since the DMA engine of the A20 does not have a mainline driver yet.

  Changes since v5:
  - Hash functions now keep partial hash states in sunxi_ss structures
  - Use of spinlock instead of mutex
  - Remove the static sunxi_ss structures by using container of
  - Add export/import functions
  - replace lots of writel by writesl
  - replace lots of readl by readsl

  Changes since v4:
  - Rework all mutex path
  - Use ahash_request_ctx() in hash functions
  - Major rework of hash functions for solving mutex problems
  - Split sunxi_req_ctx in two since ciphers now use struct sunxi_tfm_ctx
  - Hash functions now test FIFO space register

  Changes since v3:
  - Remove all algorithms options from Kconfig, so now only one module is used
  - Add the sunxi_ss_cipher function to unify mode calculation
  - Remove the sunxi_cipher_exit empty function
  - Add some missing mutex_unlock()
  - Drop PRNG support, I wait for more comment on its results before re-enabling it.

  Changes since v2:
  - Fix Makefile and Kconfig for static kernel.

  Changes since v1:
  - annotate ss->base as __iomem
  - regroup all mutex in the ss_ctx structure
  - splited driver in 7 modules (core md5 sha1 aes des 3des prng) in sunxi-ss directory
  - use dev_exit_p() for .remove
  - added missing CRYPTO_BLKCIPHER dep in Kconfig
  - use ahash instead of shash
  - use ablkcipher instead of blkcipher
  - use crypto_rng_ctx instead of crypto_tfm_ctx
  - set seed as an u32
  - drop useless comment decoration
  - drop useless debug
  - ss_ctx is now a static pointer and whole structure being allocated
  - fix the platform_get_resource/devm_ioremap_resource pattern
  - invert getting die id and configuring clock
  - set clock value as a const unsigned long
  - add MODULE_ALIAS
  - use define names more consistency (SS_xxx)
  - fix PRNG errors
  - respell SS to Security System in DT documentation

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-02 19:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 19:01 [PATCH v6] crypto: Add Allwinner Security System crypto accelerator LABBE Corentin
     [not found] ` <1426532482-28830-1-git-send-email-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-16 19:01   ` [PATCH v6 1/4] ARM: sun7i: dt: Add Security System to A20 SoC DTS LABBE Corentin
2015-03-16 19:01   ` [PATCH v6 2/4] ARM: sunxi: dt: Add DT bindings documentation for SUNXI Security System LABBE Corentin
2015-03-16 19:01   ` [PATCH v6 3/4] MAINTAINERS: Add myself as maintainer of Allwinner " LABBE Corentin
2015-03-16 19:06     ` Joe Perches
2015-03-16 19:01   ` [PATCH v6 4/4] crypto: Add Allwinner Security System crypto accelerator LABBE Corentin
2015-03-26 18:31     ` Boris Brezillon
2015-04-02 19:11       ` Corentin LABBE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).