OMAP AES hw supports AES-GCM mode.
Adding support for GCM and RFC4106 GCM mode in omap-aes driver.
Signed-off-by: Lokesh Vutla <lokeshvu...@ti.com>
---
Tested on BeagleBone-Black: http://pastebin.ubuntu.com/12417512/
Changes since v1:
- Addressed comments by Herbert.
Previously poste
Hi Herbert,
On Wednesday 08 July 2015 09:48 AM, Herbert Xu wrote:
On Tue, Jul 07, 2015 at 09:01:48PM +0530, Lokesh Vutla wrote:
+static int omap_aes_gcm_copy_buffers(struct omap_aes_dev *dd,
+ struct aead_request *req)
[..snip..]
+static int do_encrypt_iv
On Wednesday 08 July 2015 01:23 PM, Herbert Xu wrote:
On Wed, Jul 08, 2015 at 03:48:05PM +0800, Herbert Xu wrote:
On Wed, Jul 08, 2015 at 12:29:47PM +0530, Lokesh Vutla wrote:
+ if (req-assoclen + req-cryptlen == 0) {
+ scatterwalk_map_and_copy(ctx-auth_tag, req-dst, 0, authlen
On Wednesday 08 July 2015 01:18 PM, Herbert Xu wrote:
On Wed, Jul 08, 2015 at 12:29:47PM +0530, Lokesh Vutla wrote:
+ if (req-assoclen + req-cryptlen == 0) {
+ scatterwalk_map_and_copy(ctx-auth_tag, req-dst, 0, authlen,
+ 1);
+ return 0
On Wednesday 08 July 2015 09:48 AM, Herbert Xu wrote:
On Tue, Jul 07, 2015 at 09:01:48PM +0530, Lokesh Vutla wrote:
+static int omap_aes_gcm_copy_buffers(struct omap_aes_dev *dd,
+ struct aead_request *req)
+{
+void *buf_in;
+int pages, alen, clen
On Wednesday 08 July 2015 09:26 AM, Herbert Xu wrote:
On Tue, Jul 07, 2015 at 09:01:47PM +0530, Lokesh Vutla wrote:
Add aead_request_cast() api to get pointer to aead_request
from cryto_async_request.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
include/crypto/internal/aead.h | 6
This series does some basic cleanup and adds support for
AES GCM mode for omap aes driver.
Changes since v1:
- Switched GCM to new AEAD interface
Lokesh Vutla (7):
crypto: omap-aes: Fix CTR mode
crypto: omap-aes: Increase priority of hw accelerator
crypto: omap-aes: Fix configuring of AES
AES_CTRL_REG is used to configure AES mode. Before configuring
any mode we need to make sure all other modes are reset or else
driver will misbehave. So mask all modes before configuring
any AES mode.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 13
The AEAD speed tests doesn't do a wait_for_completition,
if the return value is EINPROGRESS or EBUSY.
Fixing it here.
Also add a test case for gcm(aes).
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
crypto/tcrypt.c | 65 ++---
1 file
is not aligned with AES_BLOCK_SIZE.
Adding support for omap-aes driver for inputs with length not aligned
with AES_BLOCK_SIZE.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 33 -
1 file changed, 16 insertions(+), 17 deletions(-)
diff
Increasing the priority of omap-aes hw algos, in order to take
precedence over sw algos.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
Add aead_request_cast() api to get pointer to aead_request
from cryto_async_request.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
include/crypto/internal/aead.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h
index
Use BIT()/GENMASK() macros for all register definitions instead of
hand-writing bit masks.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/crypto/omap
OMAP AES hw supports AES-GCM mode.
Adding support for GCM mode in omap-aes driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/Kconfig| 1 +
drivers/crypto/Makefile | 3 +-
drivers/crypto/omap-aes-gcm.c | 376
Hi,
On Monday 06 July 2015 01:05 PM, Herbert Xu wrote:
On Thu, Jul 02, 2015 at 10:48:38AM +0530, Lokesh Vutla wrote:
Now the driver supports gcm mode, add omap-aes-gcm
algo info to omap-aes driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
You're using the old AEAD interface. We
On Thursday 02 July 2015 01:34 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:35AM +0530, Lokesh Vutla wrote:
OMAP AES hw supports aes gcm mode.
here you refer to it as 'gcm'
Will update it in next revision.
Adding support for GCM mode in omap-aes driver.
while here
On Thursday 02 July 2015 01:34 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:36AM +0530, Lokesh Vutla wrote:
Its not necessary that assoc data and plain text is passed always.
Add these checks before processing the input.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
why can't
On Thursday 02 July 2015 01:27 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:32AM +0530, Lokesh Vutla wrote:
AES_CTRL_REG is used to configure AES mode. Before configuring
any mode we need to make sure all other modes are reset or else
driver will misbehave. So mask all modes before
On Thursday 02 July 2015 01:28 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:33AM +0530, Lokesh Vutla wrote:
Add aead_request_cast() api to get pointer to aead_request
from cryto_async_request.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
include/linux/crypto.h |6
On Thursday 02 July 2015 01:30 PM, Stephan Mueller wrote:
Am Donnerstag, 2. Juli 2015, 10:48:38 schrieb Lokesh Vutla:
Hi Lokesh,
Now the driver supports gcm mode, add omap-aes-gcm
algo info to omap-aes driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c
On Thursday 02 July 2015 01:36 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:39AM +0530, Lokesh Vutla wrote:
Add support for PIO mode for GCM mode.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
why do you require PIO ? Is there any situation where DMA can't be
used? What would
On Thursday 02 July 2015 01:23 PM, Felipe Balbi wrote:
On Thu, Jul 02, 2015 at 10:48:31AM +0530, Lokesh Vutla wrote:
OMAP AES driver returns an error if the data is not aligned with
AES_BLOCK_SIZE bytes.
But OMAP AES hw allows data input upto 1 byte aligned, but still
zeros are to be appended
)
[4.328500] [c004a840] (irq_exit) from [c000f9ac] (handle_IRQ+0x50/0xb0)
[4.335589] [c000f9ac] (handle_IRQ) from [c0008688]
(gic_handle_irq+0x28/0x5c)
Removing the duplicate call to dma_unmap_sg().
Reported-by: Tomi Valkeinen tomi.valkei...@ti.com
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
OMAP AES hw supports aes gcm mode.
Adding support for GCM mode in omap-aes driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/Makefile |3 +-
drivers/crypto/omap-aes-gcm.c | 304 +
drivers/crypto/omap-aes.c | 238
Adding simple speed tests for a range of block sizes for Async AEAD crypto
algorithms.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
crypto/tcrypt.c | 233 +++
crypto/tcrypt.h |1 +
2 files changed, 234 insertions(+)
diff --git
Add aead_request_cast() api to get pointer to aead_request
from cryto_async_request.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
include/linux/crypto.h |6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 10df5d2..20fac3d
Now the driver supports gcm mode, add omap-aes-gcm
algo info to omap-aes driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index
for inputs not aligned with AES_BLOCK_SIZE.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 33 -
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 9a28b7e..a923101
Use BIT()/GENMASK() macros for all register definitions instead of
hand-writing bit masks.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/crypto/omap
Check if the inputs are not aligned, if not process
the input before starting the hw acceleration.
Similarly after completition of hw acceleration.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes-gcm.c | 82 +
1 file changed
Its not necessary that assoc data and plain text is passed always.
Add these checks before processing the input.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes-gcm.c | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git
Add support for PIO mode for GCM mode.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes-gcm.c | 10 ++
drivers/crypto/omap-aes.c | 24 ++--
drivers/crypto/omap-aes.h |3 ++-
3 files changed, 26 insertions(+), 11 deletions
AES_CTRL_REG is used to configure AES mode. Before configuring
any mode we need to make sure all other modes are reset or else
driver will misbehave. So mask all modes before configuring
any AES mode.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-aes.c | 13
This series does some basic cleanup and adds support for
AES GCM mode for omap aes driver.
Also adds a test case for async aead algos.
Tested on BeagelBoneBlack: http://pastebin.ubuntu.com/11808341/
Lokesh Vutla (10):
crypto: omap-aes: Add support for lengths not aligned
-by: Lokesh Vutla lokeshvu...@ti.com
---
- Tested on BBB. Logs below.
Without this patch: http://pastebin.ubuntu.com/10722994/
With this patch: http://pastebin.ubuntu.com/10722992/
drivers/crypto/omap-sham.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/omap-sham.c b
Hi Herbert,
On Wednesday 01 April 2015 07:48 PM, Herbert Xu wrote:
On Tue, Mar 31, 2015 at 09:52:23AM +0530, Lokesh Vutla wrote:
Commit 26a05489ee0e (crypto: omap-sham - Map SG pages if they are HIGHMEM
before accessing)
says that HIGHMEM pages may not be mapped so we must
kmap them before
if they are HIGHMEM
before accessing)
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-sham.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 3c76696..ace5852 100644
--- a/drivers/crypto/omap
a single element SG list
for this buffer with length as the total bytes to crypt, which is
similar thing that is done in case of unaligned lengths.
Fixes: 6242332ff2f3 (crypto: omap-aes - Add support for cases of unaligned
lengths)
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto
: scheduling while atomic: kworker/0:2/2676/0x0100
Add pm_runtime_irq_safe() to avoid this.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-sham.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index ace5852..81ed511
of entropy generated.
Yes you are correct. Patch looks good to me.
It should be RNG_CONTROL_REG
Acked-by: Lokesh Vutla lokeshvu...@ti.com
Thanks and regards,
Lokesh
Apart from the strange logic, I have reason to suspect that the OMAP4 related
code in this driver is driving an Inside Secure IP
Hi Joel,
On Sunday 18 August 2013 08:12 AM, Joel Fernandes wrote:
In early version of this driver, assumptions were made such as DMA layer
requires contiguous buffers etc. Due to this, new buffers were allocated,
mapped and used for DMA. These assumptions are no longer true and DMAEngine
the state machine looks like:
- if input buffer 9 : use fallback driver
- else if input buffer block size : Copy input buffer into data_in regs
- else if dma enabled: use dma transfer
else use cpu polling mode.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap
This patch series updates the following for the driver:
- Enable polling mode if DMA fails.
- Correct the DMA burst size.
Lokesh Vutla (2):
crypto: omap-sham: Enable Polling mode if DMA fails
crypto: omap-sham: correct dma burst size
drivers/crypto/omap-sham.c | 72
Each cycle of SHA512 operates on 32 data words where as
SHA256 operates on 16 data words. This needs to be updated
while configuring DMA channels. Doing the same.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-sham.c | 11 ---
1 file changed, 4 insertions(+), 7
it is grouped with its operations struct, which
for the omap4 case means also under the #ifdef CONFIG_OF, where it needs
to be.
Missed testing this. Thanks for the patch.
Reviewed-by: Lokesh Vutla lokeshvu...@ti.com
Regards,
Lokesh
Signed-off-by: Olof Johansson o...@lixom.net
Cc: Lokesh Vutla lokeshvu
The omap_init_rng() routine in devices.c only needs to be
called when there is no device tree present.
Cc: Tony Lindgren t...@atomide.com
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
arch/arm/mach-omap2/devices.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch
Add Device Tree suport to the omap-rng driver.
Currently, only support for OMAP2 and OMAP3 is
being added but support for OMAP4 and OMAP5 will
be added in a subsequent patch.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/char/hw_random/omap-rng.c | 12
1 file changed
module_platform_driver() makes the code simpler.
Using the macro in the driver.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/char/hw_random/omap-rng.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/char/hw_random/omap-rng.c
b
routine pointers, register offsets. OMAP2
specific routines are prefixed with 'omap2_' and OMAP4
specific routines are prefixed with 'omap4_'.
Note: Few Hard coded values are from the TI AM33xx SDK.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/char/hw_random/Kconfig|6 +-
drivers
This patch series adds support for SHA348 and SHA512 in addition to MD5,
SHA1, SHA224 SHA256 that the omap sha module supports. Also adding the pdata
for OMAP5 and AM43xx Soc's.
And using devm_* calls to make cleanup paths simpler.
Lokesh Vutla (4):
crypto: omap-sham: Add SHA384 and SHA512
info.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/Kconfig | 11 +-
drivers/crypto/omap-sham.c | 245
2 files changed, 209 insertions(+), 47 deletions(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index
Using devm_request_irq() rather than request_irq().
So removing free_irq() calls from the probe error
path and the remove handler.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-sham.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git
Use devm_kzalloc() to make cleanup paths simpler.
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
drivers/crypto/omap-sham.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index b82b140..ae1ca8b2
53 matches
Mail list logo