Skip to content

Commit c34a320

Browse files
Ard Biesheuvelherbertx
authored andcommitted
crypto: atmel-ecc - factor out code that can be shared
In preparation of adding support for the random number generator in Atmel atsha204a devices, refactor the existing atmel-ecc driver (which drives hardware that is closely related) so we can share the basic I2C and command queuing routines. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 3c756aa commit c34a320

File tree

5 files changed

+451
-389
lines changed

5 files changed

+451
-389
lines changed

drivers/crypto/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,13 @@ config CRYPTO_DEV_ATMEL_SHA
519519
To compile this driver as a module, choose M here: the module
520520
will be called atmel-sha.
521521

522+
config CRYPTO_DEV_ATMEL_I2C
523+
tristate
524+
522525
config CRYPTO_DEV_ATMEL_ECC
523526
tristate "Support for Microchip / Atmel ECC hw accelerator"
524527
depends on I2C
528+
select CRYPTO_DEV_ATMEL_I2C
525529
select CRYPTO_ECDH
526530
select CRC16
527531
help

drivers/crypto/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
33
obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o
44
obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
5+
obj-$(CONFIG_CRYPTO_DEV_ATMEL_I2C) += atmel-i2c.o
56
obj-$(CONFIG_CRYPTO_DEV_ATMEL_ECC) += atmel-ecc.o
67
obj-$(CONFIG_CRYPTO_DEV_CAVIUM_ZIP) += cavium/
78
obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/

0 commit comments

Comments
 (0)