From 2789c08fffeae270820dda5d096634aecc810af5 Mon Sep 17 00:00:00 2001 From: Andreas Westin Date: Mon, 30 Apr 2012 10:11:17 +0200 Subject: crypto: ux500 - Add driver for CRYP hardware This adds a driver for the ST-Ericsson ux500 crypto hardware module. It supports AES, DES and 3DES, the driver implements support for AES-ECB,CBC and CTR. Acked-by: Linus Walleij Signed-off-by: Andreas Westin Signed-off-by: Herbert Xu --- arch/arm/mach-ux500/include/mach/crypto-ux500.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm/mach-ux500/include/mach/crypto-ux500.h (limited to 'arch/arm/mach-ux500/include') diff --git a/arch/arm/mach-ux500/include/mach/crypto-ux500.h b/arch/arm/mach-ux500/include/mach/crypto-ux500.h new file mode 100644 index 000000000000..c470567775b7 --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/crypto-ux500.h @@ -0,0 +1,16 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * + * Author: Joakim Bech for ST-Ericsson + * License terms: GNU General Public License (GPL) version 2 + */ +#ifndef _CRYPTO_UX500_H +#include +#include + +struct cryp_platform_data { + struct stedma40_chan_cfg mem_to_engine; + struct stedma40_chan_cfg engine_to_mem; +}; + +#endif -- cgit v1.2.3 From 8a63b1994c500d4825ee73dc71502deffe5b135b Mon Sep 17 00:00:00 2001 From: Andreas Westin Date: Mon, 30 Apr 2012 10:11:18 +0200 Subject: crypto: ux500 - Add driver for HASH hardware 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 Signed-off-by: Andreas Westin Signed-off-by: Herbert Xu --- arch/arm/mach-ux500/include/mach/crypto-ux500.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-ux500/include') diff --git a/arch/arm/mach-ux500/include/mach/crypto-ux500.h b/arch/arm/mach-ux500/include/mach/crypto-ux500.h index c470567775b7..de40add19166 100644 --- a/arch/arm/mach-ux500/include/mach/crypto-ux500.h +++ b/arch/arm/mach-ux500/include/mach/crypto-ux500.h @@ -8,6 +8,11 @@ #include #include +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; -- cgit v1.2.3 From 585d188f8072aa3722d5c1ec1f0f2ea82e474778 Mon Sep 17 00:00:00 2001 From: Andreas Westin Date: Thu, 10 May 2012 10:14:06 +0200 Subject: mach-ux500: crypto - core support for CRYP/HASH module. This adds the required platform data and calls to enable the CRYP/HASH driver. Signed-off-by: Andreas Westin Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Herbert Xu --- arch/arm/mach-ux500/include/mach/crypto-ux500.h | 1 + arch/arm/mach-ux500/include/mach/devices.h | 3 +++ arch/arm/mach-ux500/include/mach/hardware.h | 3 +++ 3 files changed, 7 insertions(+) (limited to 'arch/arm/mach-ux500/include') diff --git a/arch/arm/mach-ux500/include/mach/crypto-ux500.h b/arch/arm/mach-ux500/include/mach/crypto-ux500.h index de40add19166..5b2d0817e26a 100644 --- a/arch/arm/mach-ux500/include/mach/crypto-ux500.h +++ b/arch/arm/mach-ux500/include/mach/crypto-ux500.h @@ -5,6 +5,7 @@ * License terms: GNU General Public License (GPL) version 2 */ #ifndef _CRYPTO_UX500_H +#define _CRYPTO_UX500_H #include #include diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h index 5f6cb71fc62d..a55454a5b21e 100644 --- a/arch/arm/mach-ux500/include/mach/devices.h +++ b/arch/arm/mach-ux500/include/mach/devices.h @@ -15,6 +15,9 @@ extern struct platform_device u8500_gpio_devs[]; extern struct amba_device ux500_pl031_device; +extern struct platform_device ux500_hash1_device; +extern struct platform_device ux500_cryp1_device; + extern struct platform_device u8500_dma40_device; extern struct platform_device ux500_ske_keypad_device; diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index d93d6dbef25b..1451f58158bf 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h @@ -31,6 +31,9 @@ #include #define MSP_TX_RX_REG_OFFSET 0 +#define CRYP1_RX_REG_OFFSET 0x10 +#define CRYP1_TX_REG_OFFSET 0x8 +#define HASH1_TX_REG_OFFSET 0x4 #ifndef __ASSEMBLY__ -- cgit v1.2.3