Re: [PATCH v5] crypto : stm32 - Add STM32F4 CRC32 support

2017-08-16 Thread Lionel DEBIEVE
Hi Cosar, Sorry for the delay to feedback. This implementation is in the good way. But it should be better to use platform data and use array with type of algs instead of duplicating the algo description for each platform. If we add a new platform, with another type of crc, we will again

[PATCH 0/2] STM32 HASH crypto driver

2017-07-13 Thread Lionel Debieve
/ testmgr. Note: Since two other set of patches (update of STM32 CRC32 and addition of STM32 CRYP) are being proposed, it may happen that there are some minor conflicts in 'Kconfig' and 'Makefile'. In that case, I will fix the issue in due course. Lionel Debieve (2): dt-bindings: Document STM32

[PATCH 1/2] dt-bindings: Document STM32 HASH bindings

2017-07-13 Thread Lionel Debieve
This adds documentation of device tree bindings for the STM32 HASH controller. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- .../devicetree/bindings/crypto/st,stm32-hash.txt | 30 ++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devi

[PATCH 2/2] crypto: stm32 - Support for STM32 HASH module

2017-07-13 Thread Lionel Debieve
This module register a HASH module that support multiples algorithms: MD5, SHA1, SHA224, SHA256. It includes the support of HMAC hardware processing corresponding to the supported algorithms. DMA or IRQ mode are used depending on data length. Signed-off-by: Lionel Debieve <lionel.debi...@st.

[PATCH 0/3] STM32 CRC update

2017-07-13 Thread Lionel Debieve
crypto algos, HASH and CRYP are pushed accordingly. Lionel Debieve (3): crypto: stm32 - CRC use relaxed function crypto: stm32 - solve crc issue during unbind crypto: stm32 - Rename module to use generic crypto drivers/crypto/Makefile| 2 +- drivers/crypto/stm32/Kconfig

[PATCH 1/3] crypto: stm32 - CRC use relaxed function

2017-07-13 Thread Lionel Debieve
In case of arm soc support, readl and writel will be optimized using relaxed functions Signed-off-by: Lionel Debieve <lionel.debi...@st.com> Reviewed-by: Fabien Dessenne <fabien.desse...@st.com> --- drivers/crypto/stm32/stm32_crc32.c | 15 --- 1 file changed, 8 inse

[PATCH 3/3] crypto: stm32 - Rename module to use generic crypto

2017-07-13 Thread Lionel Debieve
The complete stm32 module is rename as crypto in order to use generic naming Signed-off-by: Lionel Debieve <lionel.debi...@st.com> Reviewed-by: Fabien Dessenne <fabien.desse...@st.com> --- drivers/crypto/Makefile | 2 +- drivers/crypto/stm32/Kconfig | 6 +++--- drivers/

[PATCH 2/3] crypto: stm32 - solve crc issue during unbind

2017-07-13 Thread Lionel Debieve
Use the correct unregister_shashes function to to remove the registered algo Signed-off-by: Lionel Debieve <lionel.debi...@st.com> Reviewed-by: Fabien Dessenne <fabien.desse...@st.com> --- drivers/crypto/stm32/stm32_crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [RESEND,PATCH v4 3/3] crypto : stm32 - Add STM32F4 CRC32 support

2017-07-17 Thread Lionel DEBIEVE
Hi Cosar, - ret = crypto_register_shashes(algs, ARRAY_SIZE(algs)); + /* For F4 series only CRC32 algorithm will be used */ + if (of_device_is_compatible(crc->dev->of_node, "st,stm32f4-crc")) + algs_size = 1; + else + algs_size =

[PATCH 1/1] crypto: stm32/hash - Remove uninitialized symbol

2017-08-18 Thread Lionel Debieve
Remove err symbol as this is not used in the thread context and the variable is not initialized. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/crypto/stm32/stm32-hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/stm32/stm32-

Re: [PATCH 1/2] crypto: stm32 - Fix uninitialized data usage

2017-09-18 Thread Lionel DEBIEVE
Hi Arnd, I've already push this fix for review last month, waiting the ack. " From: Lionel Debieve <lionel.debi...@st.com> To: Herbert Xu <herb...@gondor.apana.org.au>, "David S . Miller" <da...@davemloft.net>, Maxime Coquelin <mcoquelin.s

[PATCH 1/1] crypto: stm32/hash - Fix return issue in update

2017-11-06 Thread Lionel Debieve
When update data reached the threshold for data processing, we must inform that processing is on going. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/crypto/stm32/stm32-hash.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/crypto

[PATCH 1/3] crypto: stm32/hash: avoid error if maxburst not defined

2018-01-29 Thread Lionel Debieve
From: Lionel Debieve <lionel.debi...@st.com> dma-maxburst is an optional value and must not return error in case of dma not used (or max-burst not defined). Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/crypto/stm32/stm32-hash.c | 11 ++- 1 file changed,

[PATCH 3/3] crypto: stm32/hash: rework padding length

2018-01-29 Thread Lionel Debieve
From: Lionel Debieve <lionel.debi...@st.com> Due to another patch, the dma fails when padding is needed as the given length is not correct. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 0/3] crypto: stm32/hash: Correction to improve robustness

2018-01-29 Thread Lionel Debieve
From: Lionel Debieve <lionel.debi...@st.com> Hi, This patch serie will improve global robustness for stm32-hash driver. Patch #1 is fixing dma-burst issue when configuration is not set. Patch #2 solves issue that occurs when irq append during final req processing. Patch #3 is fixing an

[PATCH 2/3] crypto: stm32/hash: fix performance issues

2018-01-29 Thread Lionel Debieve
From: Lionel Debieve <lionel.debi...@st.com> Fixing bugs link to stress tests. Bad results are detected during testmgr selftests executing in a faster environment. bufcnt value may be resetted and false IT are sometimes detected. Signed-off-by: Lionel Debieve <lionel.debi...@st.com>

[PATCH 3/5] hwrng: stm32 - allow disable clock error detection

2018-01-29 Thread Lionel Debieve
Add a new property that allow to disable the clock error detection which is required when the clock source selected is out of specification (which is not mandatory). Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/stm32-rng.c | 10 +- 1 file chan

[PATCH 2/5] dt-bindings: rng: add reset node for stm32

2018-01-29 Thread Lionel Debieve
Adding optional resets property for rng. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.txt b/Documentation/devi

[PATCH 0/5] hwrng: stm32 - Improvement for stm32-rng

2018-01-29 Thread Lionel Debieve
on specific target. Patch #5 rework the timeout calculation for read value that was previously defined based on loop operation and is now based on timer. Lionel Debieve (5): hwrng: stm32 - add reset during probe dt-bindings: rng: add reset node for stm32 hwrng: stm32 - allow disable clock

[PATCH 4/5] dt-bindings: rng: add clock detection error for stm32

2018-01-29 Thread Lionel Debieve
Add optional property to enable the clock detection error on rng block. It is used to allow slow clock source which give correct entropy for rng. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 1 + 1 file changed, 1 ins

[PATCH 1/5] hwrng: stm32 - add reset during probe

2018-01-29 Thread Lionel Debieve
Avoid issue when probing the RNG without reset if bad status has been detected previously Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/stm32-rng.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/char/hw_random/stm32-rng.c b/driver

[PATCH Resend 1/5] hwrng: stm32 - add reset during probe

2018-02-15 Thread Lionel Debieve
Avoid issue when probing the RNG without reset if bad status has been detected previously Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/stm32-rng.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/char/hw_random/stm32-rng.c b/driver

[PATCH Resend 0/5] hwrng: stm32 - Improvement for stm32-rng

2018-02-15 Thread Lionel Debieve
on specific target. Patch #5 rework the timeout calculation for read value that was previously defined based on loop operation and is now based on timer. Lionel Debieve (5): hwrng: stm32 - add reset during probe dt-bindings: rng: add reset node for stm32 hwrng: stm32 - allow disable clock

[PATCH Resend 4/5] dt-bindings: rng: add clock detection error for stm32

2018-02-15 Thread Lionel Debieve
Add optional property to enable the clock detection error on rng block. It is used to allow slow clock source which give correct entropy for rng. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 1 + 1 file changed, 1 ins

[PATCH Resend 5/5] hwrng: stm32 - rework read timeout calculation

2018-02-15 Thread Lionel Debieve
Increase timeout delay to support longer timing linked to rng initialization. Measurement is based on timer instead of instructions per iteration which is not powerful on all targets. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/stm32-rng.

[PATCH Resend 2/5] dt-bindings: rng: add reset node for stm32

2018-02-15 Thread Lionel Debieve
Adding optional resets property for rng. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- Documentation/devicetree/bindings/rng/st,stm32-rng.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.txt b/Documentation/devi

[PATCH Resend 3/5] hwrng: stm32 - allow disable clock error detection

2018-02-15 Thread Lionel Debieve
Add a new property that allow to disable the clock error detection which is required when the clock source selected is out of specification (which is not mandatory). Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/stm32-rng.c | 10 +- 1 file chan

[PATCH 2/2] hwrng: stm32-rng - fix pm_suspend issue

2018-04-23 Thread Lionel Debieve
When suspend is called after pm_runtime_suspend, same callback is used and access to rng register is freezing system. By calling the pm_runtime_force_suspend, it first checks that runtime has been already done. Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_

[PATCH 0/2] Fix stm32-rng for default state and suspend

2018-04-23 Thread Lionel Debieve
This series are fixing the default build state for stm32-rng that activate the driver with arm multi_v7_defconfig. Second patch is fixing the power suspend/resume behavior which was not working. Lionel Debieve (2): hwrng: stm32 - define default state for rng driver hwrng: stm32-rng: Fix

[PATCH 1/2] hwrng: stm32 - define default state for rng driver

2018-04-23 Thread Lionel Debieve
Define default state for stm32_rng driver. It will be default selected with multi_v7_defconfig Signed-off-by: Lionel Debieve <lionel.debi...@st.com> --- drivers/char/hw_random/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_