Skip to content

Commit

Permalink
crypto: ux500 - Add driver for HASH hardware
Browse files Browse the repository at this point in the history
This adds a driver for the ST-Ericsson ux500 hash hardware
module. The driver implements support for SHA-1 and SHA-2.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Westin <andreas.westin@stericsson.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Andreas Westin authored and Herbert Xu committed May 4, 2012
1 parent 2789c08 commit 8a63b19
Show file tree
Hide file tree
Showing 6 changed files with 2,440 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-ux500/include/mach/crypto-ux500.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#include <linux/dmaengine.h>
#include <plat/ste_dma40.h>

struct hash_platform_data {
void *mem_to_engine;
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
};

struct cryp_platform_data {
struct stedma40_chan_cfg mem_to_engine;
struct stedma40_chan_cfg engine_to_mem;
Expand Down
9 changes: 9 additions & 0 deletions drivers/crypto/ux500/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ config CRYPTO_DEV_UX500_CRYP
This selects the crypto driver for the UX500_CRYP hardware. It supports
AES-ECB, CBC and CTR with keys sizes of 128, 192 and 256 bit sizes.

config CRYPTO_DEV_UX500_HASH
tristate "UX500 crypto driver for HASH block"
depends on CRYPTO_DEV_UX500
select CRYPTO_HASH
select CRYPTO_HMAC
help
This selects the hash driver for the UX500_HASH hardware.
Depends on UX500/STM DMA if running in DMA mode.

config CRYPTO_DEV_UX500_DEBUG
bool "Activate ux500 platform debug-mode for crypto and hash block"
depends on CRYPTO_DEV_UX500_CRYP || CRYPTO_DEV_UX500_HASH
Expand Down
1 change: 1 addition & 0 deletions drivers/crypto/ux500/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# License terms: GNU General Public License (GPL) version 2
#

obj-$(CONFIG_CRYPTO_DEV_UX500_HASH) += hash/
obj-$(CONFIG_CRYPTO_DEV_UX500_CRYP) += cryp/
11 changes: 11 additions & 0 deletions drivers/crypto/ux500/hash/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Copyright (C) ST-Ericsson SA 2010
# Author: Shujuan Chen (shujuan.chen@stericsson.com)
# License terms: GNU General Public License (GPL) version 2
#
ifdef CONFIG_CRYPTO_DEV_UX500_DEBUG
CFLAGS_hash_core.o := -DDEBUG -O0
endif

obj-$(CONFIG_CRYPTO_DEV_UX500_HASH) += ux500_hash.o
ux500_hash-objs := hash_core.o
Loading

0 comments on commit 8a63b19

Please sign in to comment.