[PATCH v5 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-04-12 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/binding

[PATCH v5 3/3] crypto: add basic driver for the MXC SCC

2016-04-12 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Changes in v5: - fix bug in mxc_scc_ablkcipher_req_complete call Changes in v4: - copy back IV on exit - rebase to v4.6-rc1 Changes in v3: -

[PATCH v5 2/3] ARM: i.MX25: add scc module to dtsi

2016-04-12 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index 6b1f4b

[PATCH v4 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-04-08 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/binding

[PATCH v4 2/3] ARM: i.MX25: add scc module to dtsi

2016-04-08 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index 6b1f4b

[PATCH v2 2/3] ARM: i.MX25: add RNGC node to dtsi

2016-03-11 Thread Steffen Trumtrar
Add a devicetree entry for the Random Number Generator Version C (RNGC). Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Changes in v2: - remove interrupt-names from dtsi arch/arm/boot/dts/imx25.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/bo

[PATCH v2 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-03-11 Thread Steffen Trumtrar
as it turns out, the driver for the RNGC works fine on the (at least) i.MX25. So, they seem to be somewhat compatible. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Changes in v2: - remove irq variable from private struct - move devm_request_irq from mxc_rngc_init to

[PATCH v2 1/3] Documentation: devicetree: add Freescale RNGC binding

2016-03-11 Thread Steffen Trumtrar
Add binding documentation for the Freescale RNGC found on some i.MX2/3/5 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Documentation/devicetree/bindings/rng/mxc_rngc.txt | 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/devi

Re: [PATCH 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-03-07 Thread Steffen Trumtrar
on, Feb 29, 2016 at 06:16:50PM -0300, Fabio Estevam wrote: > > >> On Mon, Feb 29, 2016 at 12:52 PM, Steffen Trumtrar > > >> <s.trumt...@pengutronix.de> wrote: > > >> > > >> > + ret = clk_prepare_enable(rngc->clk); >

[PATCH v3 3/3] crypto: add basic driver for the MXC SCC

2016-03-07 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Changes in v3: - don't just unlock mutex in mxc_scc_ablkcipher_next, but also return, too - replace mutex with bool to make lockdep happy Changes

[PATCH v3 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-03-07 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- Changes in v2: - add clocks to required properties - add Acked-by .../devicetree/binding

[PATCH v3 2/3] ARM: i.MX25: add scc module to dtsi

2016-03-07 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329

[PATCH 3/3] hwrng: mxc-fsl - add support for Freescale RNGC

2016-02-29 Thread Steffen Trumtrar
as it turns out, the driver for the RNGC works fine on the (at least) i.MX25. So, they seem to be somewhat compatible. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- drivers/char/hw_random/Kconfig| 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_rand

[PATCH 1/3] Documentation: devicetree: add Freescale RNGC binding

2016-02-29 Thread Steffen Trumtrar
Add binding documentation for the Freescale RNGC found on some i.MX2/3/5 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Documentation/devicetree/bindings/rng/mxc_rngc.txt | 16 1 file changed, 16 insertions(+) create mode 100644 Documentation/devi

[PATCH 2/3] ARM: i.MX25: add RNGC node to dtsi

2016-02-29 Thread Steffen Trumtrar
Add a devicetree entry for the Random Number Generator Version C (RNGC). Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi

[PATCH v2 3/3] crypto: add basic driver for the MXC SCC

2016-02-29 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- Changes since v1: - minor code cleanups (double newlines, unnecessary parentesis, ...) - mxc_scc_ablkcipher_next: complete request with error

[PATCH v2 2/3] ARM: i.MX25: add scc module to dtsi

2016-02-29 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329

[PATCH v2 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-29 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> Acked-by: Rob Herring <r...@kernel.org> --- Changes since v1: - add clocks to required properties - add Acked-by .../devicetree/binding

Re: [PATCH 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-16 Thread Steffen Trumtrar
Hi! Shawn Guo writes: > On Thu, Feb 11, 2016 at 03:04:43PM +0100, Steffen Trumtrar wrote: >> Add documentation for the Freescale Security Controller (SCC) >> found on i.MX25 SoCs. >> >> Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> >> ---

[PATCH 3/3] crypto: add basic driver for the MXC SCC

2016-02-11 Thread Steffen Trumtrar
information about this unit is gathered from the GPL'ed driver from Freescale. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 1 + drivers/crypto/mxc-scc.c | 756 +++ 3

[PATCH 2/3] ARM: i.MX25: add scc module to dtsi

2016-02-11 Thread Steffen Trumtrar
Add the Security Controller (SCC) module to the dtsi. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- arch/arm/boot/dts/imx25.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi index cde329

[PATCH 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-02-11 Thread Steffen Trumtrar
Add documentation for the Freescale Security Controller (SCC) found on i.MX25 SoCs. Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- .../devicetree/bindings/crypto/fsl-imx-scc.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documen

Re: [Linux-ima-user] [RFC] i.MX6 CAAM blob generator for IMA/EVM initialization

2016-01-27 Thread Steffen Trumtrar
Hi! Mimi Zohar writes: > On Mon, 2015-11-09 at 16:18 +0100, Steffen Trumtrar wrote: >> Hi! >> >> The RFC Patch attached after this cover letter is mostly for illustration >> purposes, so please don't waste too much time reviewing the code ;-) >> >> For c

[RFC] crypto: caam - add red blobifier

2015-11-09 Thread Steffen Trumtrar
Signed-off-by: Steffen Trumtrar <s.trumt...@pengutronix.de> --- drivers/crypto/caam/Kconfig| 9 + drivers/crypto/caam/Makefile | 1 + drivers/crypto/caam/blob_gen.c | 528 + 3 files changed, 538 insertions(+) create mode 100644 drivers/

Re: [PATCH RFC 05/11] crypto: caam - Add cache coherency support to Freescale CAAM scatterlist implementation

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:53PM -0700, Victoria Milhoan wrote: Add cache coherency support to the CAAM scatterlist implementation. Signed-off-by: Victoria Milhoan vicki.milh...@freescale.com --- drivers/crypto/caam/sg_sw_sec4.h | 12 ++-- 1 file changed, 10 insertions(+), 2

Re: [PATCH RFC 01/11] crypto: caam - Add cache coherency support

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:49PM -0700, Victoria Milhoan wrote: Freescale i.MX6 ARM platforms do not support hardware cache coherency. This patch adds cache coherency support to the CAAM driver. Signed-off-by: Victoria Milhoan vicki.milh...@freescale.com ---

Re: [PATCH RFC 06/11] crypto: caam - Enable MXC devices to select CAAM driver in Kconfig

2015-06-17 Thread Steffen Trumtrar
On Mon, Jun 15, 2015 at 04:52:54PM -0700, Victoria Milhoan wrote: From: Steve Cornelius steve.cornel...@freescale.com Allow CAAM to be selected in the kernel for Freescale i.MX6 devices if ARCH_MXC is enabled. Signed-off-by: Steve Cornelius steve.cornel...@freescale.com Signed-off-by:

[PATCH] crypto: caam - fix non-64-bit write/read access

2015-06-16 Thread Steffen Trumtrar
...@arm.linux.org.uk Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- This patch is only compile-tested for PowerPC and tested on ARM. According to the datasheets for i.MX6 and P1010 this should be correct, though. drivers/crypto/caam/regs.h | 38 +++--- 1 file

[BUG?] crypto: caam: little/big endianness on ARM vs PPC

2015-06-15 Thread Steffen Trumtrar
. On the other hand the sizeof(..) solution would only catch little endian on 32bit and not big endian (?!) I however don't know what combinations actually *have* to be caught, as I don't know, which exist. So, what do you think people? Thanks, Steffen Trumtrar -- Pengutronix e.K

Re: Sahara performance on i.MX53

2015-04-27 Thread Steffen Trumtrar
Hi! On Mon, Apr 27, 2015 at 07:16:22PM +0200, Martin Fuzzey wrote: Hi, I've been trying the Sahara crypto module on i.MX53 [mainline 3.19 kernel + b251638c46a (crypto: sahara - use the backlog)] I tested using dm-crypt with AES-128: cryptsetup -v --key-size=128 luksFormat /dev/mmcblk0p7

[PATCH 2/2] crypto: sahara - fix AES descriptor create

2015-04-07 Thread Steffen Trumtrar
key is to be set and use the first descriptor for data otherwise. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto

[PATCH 1/2] crypto: sahara - use the backlog

2015-04-07 Thread Steffen Trumtrar
With commit 7e77bdebff5cb1e9876c561f69710b9ab8fa1f7e crypto: af_alg - fix backlog handling in place, the backlog works under all circumstances where it previously failed, atleast for the sahara driver. Use it. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers

Re: [PATCH v4 0/4] crypto: sahara - SHA support

2014-12-03 Thread Steffen Trumtrar
On Wed, Dec 03, 2014 at 10:34:16PM +0800, Herbert Xu wrote: On Mon, Dec 01, 2014 at 01:26:30PM +0100, Steffen Trumtrar wrote: Hi! This series adds support for - i.MX53 support - SHA1/256 to the SAHARA driver. - Version 4 is a major overhaul of the previous versions

[PATCH v4 0/4] crypto: sahara - SHA support

2014-12-01 Thread Steffen Trumtrar
is queued into the device and makes sure that the requests from user-space processes are correctly enqueued into the queue. This means, that the queue is responsible for sequentializing accesses from userspace. - The request is now saved into the sahara_sha_reqctx Regards, Steffen Steffen

[PATCH v4 4/4] crypto: sahara - add support for SHA1/256

2014-12-01 Thread Steffen Trumtrar
testprogram using AF_ALG with+without upto 128 pthreads on each AES and SHA256 on i.MX53. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 626 +++- 1 file changed, 621 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v4 3/4] crypto: sahara - replace tasklets with kthread

2014-12-01 Thread Steffen Trumtrar
mechanism in the queue manager thread. This makes the control flow more obvious and guarantees, that only one request is dequeued until the completion is completed. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 152

[PATCH v4 2/4] crypto: sahara - add support for i.MX53

2014-12-01 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt| 2 +- drivers/crypto/sahara.c | 20 +--- 2 files

[QUESTION] How is the backlog supposed to be used?

2014-12-01 Thread Steffen Trumtrar
Hi all! I have a question regarding the use of the backlog in a driver using the crypto API. In my driver (crypto: sahara - SHA support) I had a problem with using the backlog when I am using more than one thread to enqueue the requests and have a queue depth of 1. What happens is, that I run

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-24 Thread Steffen Trumtrar
Hi! On Fri, Oct 24, 2014 at 09:41:27PM +0800, Herbert Xu wrote: On Tue, Oct 07, 2014 at 08:47:05AM +0200, Steffen Trumtrar wrote: This is still wrong since the context needs to be stored in the request. Otherwise multiple requests will corrupt each other's state. :-( Okay

[PATCH v3 1/3] crypto: sahara - initialize spinlock

2014-10-24 Thread Steffen Trumtrar
The driver uses a spinlock, but never initializes it. Fix this. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 164e1ec624e3..6fb16fe7eea5 100644

[PATCH v3 0/3] crypto: sahara - SHA1/256 support

2014-10-24 Thread Steffen Trumtrar
Hi! Changes since v2: - added a patch to fix a bug with the spinlock - save the context in the request - made the code threadsafe Regards, Steffen Steffen Trumtrar (3): crypto: sahara - initialize spinlock crypto: sahara - add support for i.MX53 crypto: sahara

[PATCH v3 3/3] crypto: sahara - add support for SHA1/256

2014-10-24 Thread Steffen Trumtrar
testprogram using AF_ALG with+without pthreads on i.MX53. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 712 ++-- 1 file changed, 692 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto

[PATCH v3 2/3] crypto: sahara - add support for i.MX53

2014-10-24 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-07 Thread Steffen Trumtrar
Hi! On Tue, Oct 07, 2014 at 10:02:01AM +0800, Herbert Xu wrote: On Mon, Oct 06, 2014 at 04:43:45PM +0200, Steffen Trumtrar wrote: Add support for the MDHA unit in the SAHARA core. The MDHA can generate hash digests for MD5 and SHA1 in version 3 and additionally SHA224 and SHA256 in version

[PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Steffen Trumtrar
. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- Changes since v1: - save context in the sahara_ctx struct - reworked the scatterlist/remainder calculation drivers/crypto/sahara.c | 689 ++-- 1 file changed, 669 insertions

[PATCH v2 1/2] crypto: sahara - add support for i.MX53

2014-10-06 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files

[PATCH v2 0/2] crypto: sahara - SHA1/256 support

2014-10-06 Thread Steffen Trumtrar
Hi! This series adds support for the SAHARA crypto module on i.MX53 in 1/2 and than adds support for SHA1/256 in 2/2. Changes since last version: - save the hash state in the sahara request struct - fixed the hash remainder calculation Regards, Steffen Steffen Trumtrar (2

Re: [PATCH 2/2] crypto: sahara - add support for SHA1/256

2014-08-29 Thread Steffen Trumtrar
Hi! On Fri, Aug 29, 2014 at 09:44:42PM +0800, Herbert Xu wrote: On Mon, Aug 18, 2014 at 03:13:39PM +0200, Steffen Trumtrar wrote: +struct sahara_sha_reqctx { + unsigned int mode; + unsigned int digest_size; + unsigned int context_size; + u8 buf[SAHARA_MAX_SHA_BLOCK_SIZE

[PATCH 2/2] crypto: sahara - add support for SHA1/256

2014-08-18 Thread Steffen Trumtrar
. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- drivers/crypto/sahara.c | 637 ++-- 1 file changed, 617 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 85df5b5..05be949 100644 --- a/drivers