Skip to contentSkip to conversation

crypto: driver for Tegra AES hardware

PATCH New Varun Wadekar 2 participants 3 messages Nov 16, 2011 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v6 cover crypto: driver for Tegra AES hardware

v6:
---
Fixed the subject line in the cover letter and removed the 'Change-Id: xxxx' lines from the commits

v5:
---
The tegra crypto driver uses the tegra_chip_uid API for the RNG calculation. If one wants to build tegra-aes as a module, then tegra_chip_uid needs to be exported.

I have also posted "arm: tegra: export tegra_chip_uid" to the mach-tegra maintainers to get this patch into their tree, but for compiling the "crypto: driver for Tegra AES hardware" patch, "arm: tegra: export tegra_chip_uid" has to be present.

I leave it to the linux-crypto maintainers to decide how they want to tackle this situation. In order to facilitate smooth compilation of the actual crytpo driver patch sending the tegra_chip_uid patch as well.

v4:
---
Mentioned the dependancy on the "arm: tegra: export tegra_chip_uid" patch

v3:
---
Add the following code from KimP in tegra_aes_handle_req

tfm = crypto_ablkcipher_reqtfm(req);
...
ctx = crypto_ablkcipher_ctx(tfm);
...
dd->ivlen = crypto_ablkcipher_ivsize(tfm);

v2:
---
Fixed the enable/disable irq related comments from Kim Phillips and some other cosmetic changes.

v1:
---
Fixed the compilation issues that Henning reported. The driver now builds as a module. Use devm_* apis. Fixed other comments from StephenW and KimP.

Henning Heinold (1):
arm: tegra: export tegra_chip_uid

Varun Wadekar (1):
crypto: driver for Tegra AES hardware

 arch/arm/mach-tegra/fuse.c |    2 +
 drivers/crypto/Kconfig     |   11 +
 drivers/crypto/Makefile    |    1 +
 drivers/crypto/tegra-aes.c | 1102 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/crypto/tegra-aes.h |  103 ++++
 5 files changed, 1219 insertions(+), 0 deletions(-)
 create mode 100644 drivers/crypto/tegra-aes.c
 create mode 100644 drivers/crypto/tegra-aes.h

A message that is not in the archive (sent off-list or not yet received): 1321433679-22036-1-git-send-email-vwadekar-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#2 lore raw

PATCH v6 1/2 arm: tegra: export tegra_chip_uid

From: Henning Heinold <[email protected]>

The crypto driver will need this api to use
it in the RNG calculations. In order to build
the crypto driver as a module, tegra_chip_uid
has to be exported.

---
 arch/arm/mach-tegra/fuse.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/fuse.c +2 -0
index 1fa26d9..ea49bd9 100644
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/io.h>
+#include <linux/module.h>
 
 #include <mach/iomap.h>
 
@@ -58,6 +59,7 @@ unsigned long long tegra_chip_uid(void)
 	hi = fuse_readl(FUSE_UID_HIGH);
 	return (hi << 32ull) | lo;
 }
+EXPORT_SYMBOL(tegra_chip_uid);
 
 int tegra_sku_id(void)
 {
Signature · 1 line
1.7.1
#3 lore raw

PATCH v6 2/2 crypto: driver for Tegra AES hardware

In reply to Varun Wadekar

driver supports ecb/cbc/ofb/ansi_x9.31rng modes,
128, 192 and 256-bit key sizes

---
 drivers/crypto/Kconfig     |   11 +
 drivers/crypto/Makefile    |    1 +
 drivers/crypto/tegra-aes.c | 1102 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/crypto/tegra-aes.h |  103 ++++
 4 files changed, 1217 insertions(+), 0 deletions(-)
 create mode 100644 drivers/crypto/tegra-aes.c
 create mode 100644 drivers/crypto/tegra-aes.h
drivers/crypto/Kconfig +11 -0
index 6d16b4b..e707979 100644
@@ -293,4 +293,15 @@ config CRYPTO_DEV_S5P
 	  Select this to offload Samsung S5PV210 or S5PC110 from AES
 	  algorithms execution.
 
+config CRYPTO_DEV_TEGRA_AES
+	tristate "Support for TEGRA AES hw engine"
+	depends on ARCH_TEGRA
+	select CRYPTO_AES
+	help
+	  TEGRA processors have AES module accelerator. Select this if you
+	  want to use the TEGRA module for AES algorithms.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called tegra-aes.
+
 endif # CRYPTO_HW
drivers/crypto/Makefile +1 -0
index 53ea501..f3e64ea 100644
@@ -13,3 +13,4 @@ obj-$(CONFIG_CRYPTO_DEV_OMAP_SHAM) += omap-sham.o
 obj-$(CONFIG_CRYPTO_DEV_OMAP_AES) += omap-aes.o
 obj-$(CONFIG_CRYPTO_DEV_PICOXCELL) += picoxcell_crypto.o
 obj-$(CONFIG_CRYPTO_DEV_S5P) += s5p-sss.o
+obj-$(CONFIG_CRYPTO_DEV_TEGRA_AES) += tegra-aes.o
drivers/crypto/tegra-aes.c new file +1102 -0

1,102 lines not on this page · raw message

drivers/crypto/tegra-aes.h new file +103 -0

103 lines not on this page · raw message

Signature · 1 line
1.7.1