Re: [PATCH] hwrng: omap - Fix RNG wait loop timeout

2019-10-14 Thread Daniel Thompson
On Mon, Oct 14, 2019 at 05:32:45PM +0530, Sumit Garg wrote: > Existing RNG data read timeout is 200us but it doesn't cover EIP76 RNG > data rate which takes approx. 700us to produce 16 bytes of output data > as per testing results. So configure the timeout as 1000us to also take > account of lack o

Re: [PATCH v3 2/2] hwrng: npcm: add NPCM RNG driver

2019-09-13 Thread Daniel Thompson
On Thu, Sep 12, 2019 at 12:01:49PM +0300, Tomer Maimon wrote: > Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. > > Signed-off-by: Tomer Maimon Reviewed-by: Daniel Thompson Note, you are welcome to preseve this if you have to respin and change directory based on Vinod&#

Re: [PATCH v2 2/2] hwrng: npcm: add NPCM RNG driver

2019-09-11 Thread Daniel Thompson
On Tue, Sep 10, 2019 at 08:53:13PM +, Milton Miller II wrote: > On September 9, 2019 around 7:40AM in somet timezone, Tomer Maimon wrote: > >+#define NPCM_RNG_TIMEOUT_USEC 2 > >+#define NPCM_RNG_POLL_USEC 1000 > > ... > > >+static int npcm_rng_init(struct hwrng *rng) > >+{ > >+

Re: [PATCH v2 1/2] dt-binding: hwrng: add NPCM RNG documentation

2019-09-10 Thread Daniel Thompson
On Tue, Sep 10, 2019 at 02:55:44PM +0300, Tomer Maimon wrote: > Hi Daniel, > > Sorry but I have probably miss it, thanks a lot for your comment > > On Tue, 10 Sep 2019 at 13:25, Daniel Thompson > wrote: > > > On Mon, Sep 09, 2019 at 03:38:39PM +0300, Tomer Maimon wro

Re: [PATCH v1 2/2] hwrng: npcm: add NPCM RNG driver

2019-09-10 Thread Daniel Thompson
On Tue, Sep 10, 2019 at 01:52:35PM +0300, Tomer Maimon wrote: > Hi Daniel, > > Thanks for your prompt reply, > > > > On Mon, 9 Sep 2019 at 18:10, Daniel Thompson > wrote: > > > On Mon, Sep 09, 2019 at 05:31:30PM +0300, Tomer Maimon wrote: > > > Hi Da

Re: [PATCH v2 2/2] hwrng: npcm: add NPCM RNG driver

2019-09-10 Thread Daniel Thompson
On Mon, Sep 09, 2019 at 03:38:40PM +0300, Tomer Maimon wrote: > Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. > > Signed-off-by: Tomer Maimon > --- > drivers/char/hw_random/Kconfig| 13 ++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/npcm-rng.c | 203 +++

Re: [PATCH v2 1/2] dt-binding: hwrng: add NPCM RNG documentation

2019-09-10 Thread Daniel Thompson
On Mon, Sep 09, 2019 at 03:38:39PM +0300, Tomer Maimon wrote: > Added device tree binding documentation for Nuvoton BMC > NPCM Random Number Generator (RNG). > > Signed-off-by: Tomer Maimon > --- > .../bindings/rng/nuvoton,npcm-rng.txt | 17 + > 1 file changed, 17 inser

Re: [PATCH v1 2/2] hwrng: npcm: add NPCM RNG driver

2019-09-09 Thread Daniel Thompson
On Mon, Sep 09, 2019 at 05:31:30PM +0300, Tomer Maimon wrote: > Hi Daniel, > > appreciate your comments and sorry for the late reply > > On Thu, 29 Aug 2019 at 13:47, Daniel Thompson > wrote: > > > On Wed, Aug 28, 2019 at 07:26:17PM +0300, Tomer Maimon wrote: > &

Re: [PATCH v1 1/2] dt-binding: hwrng: add NPCM RNG documentation

2019-08-29 Thread Daniel Thompson
On Wed, Aug 28, 2019 at 07:26:16PM +0300, Tomer Maimon wrote: > Added device tree binding documentation for Nuvoton BMC > NPCM Random Number Generator (RNG). > > Signed-off-by: Tomer Maimon > --- > .../bindings/rng/nuvoton,npcm-rng.txt | 17 + > 1 file changed, 17 inser

Re: [PATCH v1 2/2] hwrng: npcm: add NPCM RNG driver

2019-08-29 Thread Daniel Thompson
On Wed, Aug 28, 2019 at 07:26:17PM +0300, Tomer Maimon wrote: > Add Nuvoton NPCM BMC Random Number Generator(RNG) driver. > > Signed-off-by: Tomer Maimon > --- > drivers/char/hw_random/Kconfig| 13 ++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/npcm-rng.c | 207 +++

Re: [PATCH v6 4/4] hwrng: add OP-TEE based rng driver

2019-01-29 Thread Daniel Thompson
ims to provides a generic interface to OP-TEE based random number > generator service. > > This driver registers on TEE bus to interact with OP-TEE based rng > device/service. > > Signed-off-by: Sumit Garg Reviewed-by: Daniel Thompson Daniel. > --- > MAINTAINERS

Re: [PATCH v5 4/4] hwrng: add OP-TEE based rng driver

2019-01-24 Thread Daniel Thompson
On Thu, Jan 24, 2019 at 11:24:39AM +0530, Sumit Garg wrote: > On ARM SoC's with TrustZone enabled, peripherals like entropy sources > might not be accessible to normal world (linux in this case) and rather > accessible to secure world (OP-TEE in this case) only. So this driver > aims to provides a

Re: [PATCH v5 3/4] tee: optee: add TEE bus device enumeration support

2019-01-24 Thread Daniel Thompson
messages from this file match those from the optee/core.c): #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Alternatively you could get the probe function to pass the optee device and use dev_*()... TBH this is pretty severe nitpicking so feel free to add my reviewed by the next time this patch c

Re: [PATCH v5 2/4] tee: add supp_nowait flag in tee_context struct

2019-01-24 Thread Daniel Thompson
nature like ones arising from TEE based kernel drivers > or any in kernel api that uses TEE internal client interface. > > Signed-off-by: Sumit Garg Reviewed-by: Daniel Thompson > --- > drivers/tee/optee/supp.c | 10 +- > drivers/tee/tee_core.c | 13 + &g

Re: [PATCH v5 1/4] tee: add bus driver framework for TEE based devices

2019-01-24 Thread Daniel Thompson
} > + > + return 0; > +} > + > +static int tee_client_device_uevent(struct device *dev, > + struct kobj_uevent_env *env) > +{ > + uuid_t *dev_id = &to_tee_client_device(dev)->id.uuid; > + > + if (add_uevent_var(env, &

Re: [PATCH v2 3/4] tee: add supp_nowait flag in tee_context struct

2019-01-11 Thread Daniel Thompson
On Fri, Jan 11, 2019 at 01:00:49PM +0530, Sumit Garg wrote: > On Thu, 10 Jan 2019 at 19:53, Daniel Thompson > wrote: > > > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c > > > index 9ddb89e..5d6c317 100644 > > > --- a/drivers/tee/tee_core.c &

Re: [PATCH v2 2/4] tee: optee: add TEE bus device enumeration support

2019-01-11 Thread Daniel Thompson
On Fri, Jan 11, 2019 at 12:52:19PM +0530, Sumit Garg wrote: > On Thu, 10 Jan 2019 at 19:49, Daniel Thompson > wrote: > > > +static int get_devices(struct tee_context *ctx, u32 session, > > > +struct tee_shm *device_uuid, u32 *shm_size) > > &g

Re: [PATCH v2 4/4] hwrng: add OP-TEE based rng driver

2019-01-10 Thread Daniel Thompson
On Thu, Jan 10, 2019 at 05:54:57PM +0530, Sumit Garg wrote: > On ARM SoC's with TrustZone enabled, peripherals like entropy sources > might not be accessible to normal world (linux in this case) and rather > accessible to secure world (OP-TEE in this case) only. So this driver > aims to provides a

Re: [PATCH v2 3/4] tee: add supp_nowait flag in tee_context struct

2019-01-10 Thread Daniel Thompson
On Thu, Jan 10, 2019 at 05:54:56PM +0530, Sumit Garg wrote: > This flag indicates that requests in this context should not wait for > tee-supplicant daemon to be started if not present and just return > with an error code. It is needed for requests which should be > non-blocking in nature like ones

Re: [PATCH v2 2/4] tee: optee: add TEE bus device enumeration support

2019-01-10 Thread Daniel Thompson
On Thu, Jan 10, 2019 at 05:54:55PM +0530, Sumit Garg wrote: > OP-TEE provides a pseudo TA to enumerate TAs which can act as devices/ > services for TEE bus. So implement device enumeration using invoke > function: PTA_CMD_GET_DEVICES provided by pseudo TA to fetch array of > device UUIDs. Also regi

Re: [PATCH v2 1/4] tee: add bus driver framework for TEE based devices

2019-01-10 Thread Daniel Thompson
On Thu, Jan 10, 2019 at 05:54:54PM +0530, Sumit Garg wrote: > Introduce a generic TEE bus driver concept for TEE based kernel drivers > which would like to communicate with TEE based devices/services. > > In this TEE bus concept, devices/services are identified via Universally > Unique Identifier

Re: [PATCH v1 1/2] dt/bindings: add bindings for optional optee rng-uuid property

2019-01-03 Thread Daniel Thompson
On Fri, Dec 28, 2018 at 02:41:01PM +0530, Sumit Garg wrote: > On Thu, 27 Dec 2018 at 19:10, Ard Biesheuvel > wrote: > > > > On Thu, 27 Dec 2018 at 12:08, Sumit Garg wrote: > > > > > > Add bindings for OP-TEE based optional hardware random number > > > generator identifier property. It could be u

[PATCH] hw_random: Improve description of the ->read() interface

2016-08-18 Thread Daniel Thompson
intended to be the weakest guarantee neccessary to allow driver writers to safely simplify their code. Signed-off-by: Daniel Thompson --- include/linux/hw_random.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/hw_random.h b/include/linux/hw_random

Re: [PATCH] Add Ingenic JZ4780 hardware RNG driver

2016-08-18 Thread Daniel Thompson
On 18/08/16 12:53, LABBE Corentin wrote: On Thu, Aug 18, 2016 at 10:44:18AM +0530, PrasannaKumar Muralidharan wrote: +static int jz4780_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) +{ + struct jz4780_rng *jz4780_rng = container_of(rng, struct jz4780_rng, +

Re: [PATCH] Add Ingenic JZ4780 hardware RNG driver

2016-08-17 Thread Daniel Thompson
On 17/08/16 16:35, PrasannaKumar Muralidharan wrote: This patch adds support for hardware random number generator present in JZ4780 SoC. Signed-off-by: PrasannaKumar Muralidharan --- .../devicetree/bindings/rng/ingenic,jz4780-rng.txt | 12 +++ MAINTAINERS

Re: [PATCH] hwrng: stm32: fix maybe uninitialized variable warning

2016-05-27 Thread Daniel Thompson
s function Reported-by: Sudip Mukherjee Suggested-by: Arnd Bergmann Cc: Daniel Thompson Reviewed-by: Daniel Thompson Signed-off-by: Maxime Coquelin --- drivers/char/hw_random/stm32-rng.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/hw_r

Re: [PATCH] hwrng: stm32 - fix build warning

2016-05-24 Thread Daniel Thompson
On 24/05/16 09:50, Maxime Coquelin wrote: diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 92a810648bd0..2a0fc90e4dc3 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -68,6 +68,10 @@ static int stm32_rng_read(str

Re: [PATCH v2 2/2] rng: pic32-rng: Add PIC32 RNG hardware driver

2016-02-08 Thread Daniel Thompson
On Mon, Feb 08, 2016 at 02:17:53PM -0700, Joshua Henderson wrote: > Add support for the hardware true random number generator > peripheral found on PIC32. > > Signed-off-by: Joshua Henderson > Signed-off-by: Purna Chandra Mandal Reviewed-by: Daniel Thompson > ---

Re: [PATCH 2/2] rng: pic32-rng: Add PIC32 RNG hardware driver

2016-02-03 Thread Daniel Thompson
On 01/02/16 22:41, Joshua Henderson wrote: Add support for the hardware pseudo and true random number generator peripheral found on PIC32. Signed-off-by: Joshua Henderson Signed-off-by: Purna Chandra Mandal --- drivers/char/hw_random/Kconfig | 13 +++ drivers/char/hw_random/Makefile

Re: [PATCH 05/22] hw_random: Fix dependencies for !HAS_IOMEM archs

2016-01-26 Thread Daniel Thompson
On 25/01/16 22:24, Richard Weinberger wrote: Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger Reviewed-by: Daniel Thompson Thanks for cleaning up after me! --- drivers/char/hw_random/Kconfig | 1 + 1 file changed, 1

[PATCH] hwrng: exynos - Fix unbalanced PM runtime get/puts

2015-10-16 Thread Daniel Thompson
Currently this driver calls pm_runtime_get_sync() rampantly but never puts anything back. This makes it impossible for the device to autosuspend properly; it will remain fully active after the first use. Fix in the obvious way. Signed-off-by: Daniel Thompson Cc: Kukjin Kim Cc: Krzysztof

[PATCH] hwrng: stm32 - Fix build with CONFIG_PM

2015-10-14 Thread Daniel Thompson
Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") was inadequately tested (actually it was tested quite hard so incompetent would be a better description that inadequate) and does not compile on platforms with CONFIG_PM set. Fix this. Signed-off-by: Daniel Thompson

[PATCH v3 0/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-14 Thread Daniel Thompson
(Linus Walleij, Maxime Coquelin). * Only WARN_ONCE() when hardware failure mechanisms trigger (Maxime Coquelin). * Simplify end of probe function after cocci warning (Fengguang Wu). * Switch to devm_hwrng_register. Daniel Thompson (3): dt-bindings: Document the STM32 HW RNG bindings

[PATCH v3 1/3] dt-bindings: Document the STM32 HW RNG bindings

2015-10-14 Thread Daniel Thompson
This adds documentation of device tree bindings for the STM32 hardware random number generator. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin Acked-by: Rob Herring --- .../devicetree/bindings/rng/st,stm32-rng.txt| 21 + 1 file changed, 21 insertions

[PATCH v3 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver

2015-10-14 Thread Daniel Thompson
New bindings and driver have been created for STM32 series parts. This patch integrates this changes. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin --- arch/arm/boot/dts/stm32f429.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch

[PATCH v3 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-14 Thread Daniel Thompson
Add support for STMicroelectronics STM32 random number generator. The config value defaults to N, reflecting the fact that STM32 is a very low resource microcontroller platform and unlikely to be targeted by any "grown up" defconfigs. Signed-off-by: Daniel Thompson Reviewed-by: Lin

Re: [cryptodev:master 62/67] drivers/char/hw_random/stm32-rng.c:163:51: error: 'pdev' undeclared

2015-10-14 Thread Daniel Thompson
On 14/10/15 15:59, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 62f57d05e287e950c6e1246b1dba08e12985195a commit: c6a97c42e399ad0d639f616e58e13f0b4ae87626 [62/67] hwrng: stm32 - add support for STM32 HW RNG config: i386

[PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings

2015-10-12 Thread Daniel Thompson
This adds documentation of device tree bindings for the STM32 hardware random number generator. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin Acked-by: Rob Herring --- .../devicetree/bindings/rng/st,stm32-rng.txt| 21 + 1 file changed, 21 insertions

[PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-12 Thread Daniel Thompson
Add support for STMicroelectronics STM32 random number generator. The config value defaults to N, reflecting the fact that STM32 is a very low resource microcontroller platform and unlikely to be targeted by any "grown up" defconfigs. Signed-off-by: Daniel Thompson --- drivers/char

[PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-12 Thread Daniel Thompson
devm_hwrng_register. Daniel Thompson (3): dt-bindings: Document the STM32 HW RNG bindings hwrng: stm32 - add support for STM32 HW RNG ARM: dts: stm32f429: Adopt STM32 RNG driver .../devicetree/bindings/rng/st,stm32-rng.txt | 21 +++ arch/arm/boot/dts/stm32f429.dtsi

[PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver

2015-10-12 Thread Daniel Thompson
New bindings and driver have been created for STM32 series parts. This patch integrates this changes. Signed-off-by: Daniel Thompson Acked-by: Maxime Coquelin --- arch/arm/boot/dts/stm32f429.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch

Re: [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-11 Thread Daniel Thompson
On 5 October 2015 at 10:22, Daniel Thompson wrote: > On 4 October 2015 at 11:32, Linus Walleij wrote: >> On Sat, Oct 3, 2015 at 10:35 PM, Daniel Thompson >> wrote: >> Then this construct: >> >>> +static int stm32_rng_read(struct hwrng *rng, vo

Re: [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-11 Thread Daniel Thompson
On 5 October 2015 at 10:22, Daniel Thompson wrote: > On 4 October 2015 at 11:32, Linus Walleij wrote: >> On Sat, Oct 3, 2015 at 10:35 PM, Daniel Thompson >> 3. I took out the datasheet for Nomadik STn8820 and it seems that >> the hardware is very similar to what this driv

Re: [PATCH v2 5/7] hwrng: st: Add support for ST's HW Random Number Generator

2015-10-05 Thread Daniel Thompson
On 05/10/15 13:11, Lee Jones wrote: On Mon, 05 Oct 2015, Daniel Thompson wrote: Late but... That's okay. Fixup patches can always be submitted. We have forever. :) On 17/09/15 14:45, Lee Jones wrote: diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile

Re: [PATCH v2 5/7] hwrng: st: Add support for ST's HW Random Number Generator

2015-10-05 Thread Daniel Thompson
Hi Lee Late but... On 17/09/15 14:45, Lee Jones wrote: diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index 055bb01..8bcfb45 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile @@ -30,4 +30,5 @@ obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rn

Re: [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-05 Thread Daniel Thompson
On 4 October 2015 at 09:52, Maxime Coquelin wrote: > Hi Daniel, > > On 10/03/2015 10:35 PM, Daniel Thompson wrote: >> >> Add support for STMicroelectronics STM32 random number generator. >> >> The config value defaults to N, reflecting the fact that STM32 is a >

Re: [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-05 Thread Daniel Thompson
On 4 October 2015 at 11:32, Linus Walleij wrote: > On Sat, Oct 3, 2015 at 10:35 PM, Daniel Thompson > wrote: > >> Add support for STMicroelectronics STM32 random number generator. >> >> The config value defaults to N, reflecting the fact that STM32 is a >>

[PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-03 Thread Daniel Thompson
Add support for STMicroelectronics STM32 random number generator. The config value defaults to N, reflecting the fact that STM32 is a very low resource microcontroller platform and unlikely to be targeted by any "grown up" defconfigs. Signed-off-by: Daniel Thompson --- drivers/char

[PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver

2015-10-03 Thread Daniel Thompson
New bindings and driver have been created for STM32 series parts. This patch integrates this changes. Signed-off-by: Daniel Thompson --- arch/arm/boot/dts/stm32f429.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429

[PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings

2015-10-03 Thread Daniel Thompson
This adds documenttaion of device tree binds for the STM32 hardware random number generator. Signed-off-by: Daniel Thompson --- .../devicetree/bindings/hwrng/stm32-rng.txt | 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG

2015-10-03 Thread Daniel Thompson
This patchset introduces a driver for the STM32 hardware random number generator. Daniel Thompson (3): dt-bindings: Document the STM32 HW RNG bindings hwrng: stm32 - add support for STM32 HW RNG ARM: dts: stm32f429: Adopt STM32 RNG driver .../devicetree/bindings/hwrng/stm32-rng.txt