From 6e66274cbeb53f22a4dd08f9c1ac119c50d34768 Mon Sep 17 00:00:00 2001 From: Philippe Langlais Date: Wed, 19 Oct 2011 13:20:08 +0200 Subject: crypto: ux500: Add crypto and hash acceleration Adds device driver support for crypto and hash acceleration for the u8500 chip. ST-Ericsson Linux next: Builds and boot, but fails on cryp probe ER320876. ST-Ericsson ID: AP 270734 crypto: ux500: cryp: Add power-awareness Adds power awareness to the cryp part of the device driver for accelerating crypto in u8500. ST-Ericsson ID: ER277473 crypto: ux500: cryp: Fix of NULL pointer dereference in power-save Fix of NULL pointer dereference in cryp_disable_power. ST-Ericsson ID: ER277473 crypto: ux500: cryp/hash: Power-awareness - Hash: Adds power awareness to the hash part of the device driver for accelerating hashing in u8500. - Cryp: - Removed erroneous call to cryp_enable_power() in u8500_cryp_resume(). - Added spinlocks to protect usage of current_ctx. - Corrected erroneous gotos in hw_cryp_noxts(). - Added down_interruptible()/up() in suspend/resume, to make sure the device is not allocated during suspend. ST-Ericsson ID: ER280692 crypto: ux500: AES ECB converted to ablk_cipher and supports DMA. - DMA support for AES_ECB added. - ablk_cipher support added to the driver. In this commit AES_ECB is using this asynchronous API. This is a must since you will get miscellaneous sleep warning- error-messages from the crypto testmgr which runs sanity tests when loading a module in synchrounous mode using DMA. Therefore DMA operations should use the ablk_cipher (asynchronous) API, - Added scatterlist walk function for ablk_cipher for the non DMA version. - Added power awarness to DMA related code in this cryp driver. - Refactored code in hw_cryp_noxts with functions calls when getting the device and when setting up the context. - Renamed registers so they corresponds to the names in the design spec. ST-Ericsson ID: AP277474 ST-Ericsson Linux next: ER320876, v-ape regulator missing. crypto: ux500: cryp: DES ECB converted to ablk_cipher. ablk_cipher support added to the driver. In this commit DES_ECB and DES3_ECB is using this asynchronous API. This removes the log printout: BUG: sleeping function called from invalid context at kernel/mutex.c:94. ST-Ericsson ID: ER322583 crypto: ux500: cryp: More algorithms converted to use ablk_cipher. In this commit AES_CBC, AES_CTR, DES_CBC and DES3_CBC is using the asynchronous API. These algorithms also support DMA, except for givciphers. ST-Ericsson ID: AP277474 crypto: ux500: cryp: Power save redesign, to improve performance - Enable and disable power moved to be called only at beginning and end of algorithm calls. - Removed compiler warnings (uninitialized variables) visible using Linux-next compiler. Note! Those warnings not visible using default compiler in the android forest. ST-Ericsson ID: AP277474 crypto: Fixes after 2.6.35 merge Signed-off-by: Berne Hebark Signed-off-by: Lee Jones Signed-off-by: Philippe Langlais Conflicts: arch/arm/mach-ux500/board-mop500.c --- 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') 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 00000000000..57da88398d5 --- /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