Re: [PATCH 2/2] ARM: bcm283x: Add missing interrupt for RNG block

2018-04-13 Thread Florian Fainelli
On Sat, 18 Nov 2017 14:04:13 +0100, Stefan Wahren <stefan.wah...@i2se.com> wrote: > This patch adds the missing interrupt property to the RNG block > of BCM283x. > > Link: https://github.com/raspberrypi/linux/issues/2195 > CC: Florian Fainelli <f.faine...@gmail.com&

Re: [PATCH 1/2] dt-binding: rng: Add interrupt property for BCM2835

2018-04-13 Thread Florian Fainelli
https://github.com/raspberrypi/linux/issues/2195 > CC: Florian Fainelli <f.faine...@gmail.com> > Signed-off-by: Stefan Wahren <stefan.wah...@i2se.com> Applied to devicetree/next, thanks! -- Florian

Re: [PATCH] hwrng: bcm2835: Handle deferred clock properly

2018-02-12 Thread Florian Fainelli
clock") > Signed-off-by: Stefan Wahren <stefan.wah...@i2se.com> Acked-by: Florian Fainelli <f.faine...@gmail.com> Thanks Stephan! -- Florian

Re: [PATCH -next] hwrng: bcm2835 - Remove redundant dev_err call in bcm2835_rng_probe()

2018-01-22 Thread Florian Fainelli
On 01/17/2018 03:40 AM, Wei Yongjun wrote: > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Acked-by: Florian Fainelli <f.faine...@gmail.com> -- Florian

Re: [v2,01/12] hwrng: bcm2835 - Obtain base register via resource

2017-11-29 Thread Florian Fainelli
On 11/28/2017 10:30 PM, Herbert Xu wrote: > On Tue, Nov 07, 2017 at 04:44:38PM -0800, Florian Fainelli wrote: >> In preparation for consolidating bcm63xx-rng into bcm2835-rng, make sure >> that we obtain the base register via platform_get_resource() since we >> need to suppo

[PATCH v2 04/12] hwrng: bcm2835-rng: Implementation cleanup callback

2017-11-07 Thread Florian Fainelli
We should be disabling the RNG in a hwrng::cleanup callback if we are not longer the system selected RNG, not wait until the device driver is removed. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 12 +--- 1 file changed, 9 inse

[PATCH v2 01/12] hwrng: bcm2835-rng: Obtain base register via resource

2017-11-07 Thread Florian Fainelli
In preparation for consolidating bcm63xx-rng into bcm2835-rng, make sure that we obtain the base register via platform_get_resource() since we need to support the non-DT enabled MIPS-based BCM63xx DSL SoCs. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/b

[PATCH v2 02/12] hwrng: bcm2835-rng: Define a driver private context

2017-11-07 Thread Florian Fainelli
Instead of making hwrng::priv host the base register address, define a driver private context, make it per platform device instance and pass it down the different functions. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.

[PATCH v2 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-07 Thread Florian Fainelli
One of the last steps before bcm63xx-rng can be eliminated is to manage a clock during hwrng::init and hwrng::cleanup, so fetch it in the probe function, and manage it during these two steps when valid. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/b

[PATCH v2 09/12] hwrng: bcm2835-rng: Add Broadcom MIPS I/O accessors

2017-11-07 Thread Florian Fainelli
Broadcom MIPS HW is always strapped to match the system-wide endian such that all I/O access to this RNG block is done with the native CPU endian, account for that. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 13 +++-- 1 file c

[PATCH v2 08/12] hwrng: bcm2835-rng: Abstract I/O accessors

2017-11-07 Thread Florian Fainelli
In preparation for allowing BCM63xx to use this driver, we abstract I/O accessors such that we can easily change those later on. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 27 +++ 1 file changed, 19 insertions

[PATCH v2 06/12] hwrng: bcm2835-rng: Rework interrupt masking

2017-11-07 Thread Florian Fainelli
we need to add a second type of platform information, we would have to do that anyway. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 39 +--- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/d

[PATCH v2 05/12] hwrng: bcm2835-rng: Use device managed helpers

2017-11-07 Thread Florian Fainelli
Now that we have moved the RNG disabling into a hwrng::cleanup callback, we can use the device managed registration operation and remove our remove callback since it won't do anything necessary. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.

[PATCH v2 11/12] hwrng: bcm2835-rng: Enable BCM2835 RNG to work on BCM63xx platforms

2017-11-07 Thread Florian Fainelli
We have now incorporated all necessary functionality for the BCM63xx platforms to successfully migrate over bcm2835-rng, so add the final bits: Kconfig selection and proper platform_device device type matching to keep the same platform device name for registration to work. Signed-off-by: Florian

[PATCH v2 10/12] dt-bindings: rng: Incorporate brcm,bcm6368.txt binding

2017-11-07 Thread Florian Fainelli
Since the same block is used on BCM2835 and BCM6368, merge the bindings and remove the brcm,bcm6368.txt binding document. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- .../devicetree/bindings/rng/brcm,bcm2835.tx

[PATCH v2 12/12] hwrng: bcm63xx-rng: Remove since bcm2835-rng takes over

2017-11-07 Thread Florian Fainelli
bcm2835-rng is now capable of supporting the BCM63xx hardware, so remove the driver which duplicates the same functionality. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/Kconfig | 13 --- drivers/char/hw_random/Makefile | 1 - driver

[PATCH v2 03/12] hwrng: bcm2835-rng: Move enabling to hwrng::init

2017-11-07 Thread Florian Fainelli
We should be moving the enabling of the HWRNG into a hwrng::init callback since we can be disabled and enabled every time a different hwrng is selected in the system. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 16

[PATCH v2 00/12] bcm63xx-rng conversion to bcm2835-rng

2017-11-07 Thread Florian Fainelli
with a warm up count and the number of words available in the FIFO size. Thanks! Changes in v2: - rework the logic about how we manage the optional clock - use pdev->name for the rng.name member Florian Fainelli (12): hwrng: bcm2835-rng: Obtain base register via resource hwrng: bcm2835-rng: Def

Re: [PATCH 11/12] hwrng: bcm2835-rng: Enable BCM2835 RNG to work on BCM63xx platforms

2017-11-06 Thread Florian Fainelli
On 11/04/2017 11:27 AM, Stefan Wahren wrote: > Hi Florian > >> Florian Fainelli <f.faine...@gmail.com> hat am 2. November 2017 um 02:04 >> geschrieben: >> >> >> We have now incorporated all necessary functionality for the BCM63xx >> platforms

Re: [PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-04 Thread Florian Fainelli
Hi Stefan, On 11/04/2017 06:50 AM, Stefan Wahren wrote: > Hi Florian, > >> Florian Fainelli <f.faine...@gmail.com> hat am 2. November 2017 um 02:04 >> geschrieben: >> >> >> One of the last steps before bcm63xx-rng can be eliminated is to manage >&g

Re: [PATCH 08/12] hwrng: bcm2835-rng: Abstract I/O accessors

2017-11-03 Thread Florian Fainelli
On 11/03/2017 01:19 PM, Eric Anholt wrote: > Florian Fainelli <f.faine...@gmail.com> writes: > >> In preparation for allowing BCM63xx to use this driver, we abstract I/O >> accessors such that we can easily change those later on. >> >> Signed-off-by: Fl

Re: [PATCH 12/12] hwrng: bcm63xx-rng: Remove since bcm2835-rng takes over

2017-11-03 Thread Florian Fainelli
On 11/03/2017 01:18 PM, Eric Anholt wrote: > Florian Fainelli <f.faine...@gmail.com> writes: > >> bcm2835-rng is now capable of supporting the BCM63xx hardware, so remove >> the driver which duplicates the same functionality. >> >> Signed-off-by: Fl

Re: [PATCH 00/12] bcm63xx-rng conversion to bcm2835-rng

2017-11-02 Thread Florian Fainelli
Hi Stefan, On 11/02/2017 12:01 PM, Stefan Wahren wrote: > Hi Florian, > >> Florian Fainelli <f.faine...@gmail.com> hat am 2. November 2017 um 02:03 >> geschrieben: >> >> >> Hi, >> >> As it usually happens when there is a fair amount of HW

[PATCH 02/12] hwrng: bcm2835-rng: Define a driver private context

2017-11-01 Thread Florian Fainelli
Instead of making hwrng::priv host the base register address, define a driver private context, make it per platform device instance and pass it down the different functions. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.

[PATCH 00/12] bcm63xx-rng conversion to bcm2835-rng

2017-11-01 Thread Florian Fainelli
with a warm up count and the number of words available in the FIFO size. Thanks! Florian Fainelli (12): hwrng: bcm2835-rng: Obtain base register via resource hwrng: bcm2835-rng: Define a driver private context hwrng: bcm2835-rng: Move enabling to hwrng::init hwrng: bcm2835-rng: Implementation

[PATCH 05/12] hwrng: bcm2835-rng: Use device managed helpers

2017-11-01 Thread Florian Fainelli
Now that we have moved the RNG disabling into a hwrng::cleanup callback, we can use the device managed registration operation and remove our remove callback since it won't do anything necessary. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.

[PATCH 01/12] hwrng: bcm2835-rng: Obtain base register via resource

2017-11-01 Thread Florian Fainelli
In preparation for consolidating bcm63xx-rng into bcm2835-rng, make sure that we obtain the base register via platform_get_resource() since we need to support the non-DT enabled MIPS-based BCM63xx DSL SoCs. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/b

[PATCH 03/12] hwrng: bcm2835-rng: Move enabling to hwrng::init

2017-11-01 Thread Florian Fainelli
We should be moving the enabling of the HWRNG into a hwrng::init callback since we can be disabled and enabled every time a different hwrng is selected in the system. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 16

[PATCH 04/12] hwrng: bcm2835-rng: Implementation cleanup callback

2017-11-01 Thread Florian Fainelli
We should be disabling the RNG in a hwrng::cleanup callback if we are not longer the system selected RNG, not wait until the device driver is removed. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 12 +--- 1 file changed, 9 inse

[PATCH 07/12] hwrng: bcm2835-rng: Manage an optional clock

2017-11-01 Thread Florian Fainelli
One of the last steps before bcm63xx-rng can be eliminated is to manage a clock during hwrng::init and hwrng::cleanup, so fetch it in the probe function, and manage it during these two steps when valid. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/b

[PATCH 06/12] hwrng: bcm2835-rng: Rework interrupt masking

2017-11-01 Thread Florian Fainelli
we need to add a second type of platform information, we would have to do that anyway. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 39 +--- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/d

[PATCH 09/12] hwrng: bcm2835-rng: Add Broadcom MIPS I/O accessors

2017-11-01 Thread Florian Fainelli
Broadcom MIPS HW is always strapped to match the system-wide endian such that all I/O access to this RNG block is done with the native CPU endian, account for that. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 13 +++-- 1 file c

[PATCH 10/12] dt-bindings: rng: Incorporate brcm,bcm6368.txt binding

2017-11-01 Thread Florian Fainelli
Since the same block is used on BCM2835 and BCM6368, merge the bindings and remove the brcm,bcm6368.txt binding document. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- .../devicetree/bindings/rng/brcm,bcm2835.txt | 22 +++--- .../devicetree/bindings/rn

[PATCH 11/12] hwrng: bcm2835-rng: Enable BCM2835 RNG to work on BCM63xx platforms

2017-11-01 Thread Florian Fainelli
We have now incorporated all necessary functionality for the BCM63xx platforms to successfully migrate over bcm2835-rng, so add the final bits: Kconfig selection and proper platform_device device type matching to keep the same platform device name for registration to work. Signed-off-by: Florian

[PATCH 12/12] hwrng: bcm63xx-rng: Remove since bcm2835-rng takes over

2017-11-01 Thread Florian Fainelli
bcm2835-rng is now capable of supporting the BCM63xx hardware, so remove the driver which duplicates the same functionality. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/Kconfig | 13 --- drivers/char/hw_random/Makefile | 1 - driver

[PATCH 08/12] hwrng: bcm2835-rng: Abstract I/O accessors

2017-11-01 Thread Florian Fainelli
In preparation for allowing BCM63xx to use this driver, we abstract I/O accessors such that we can easily change those later on. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/bcm2835-rng.c | 27 +++ 1 file changed, 19 insertions

[PATCH 0/2] hwrng: iproc-rng200: Add support for BCM7278

2017-11-01 Thread Florian Fainelli
Hi, This patch series adds support for the RNG200 block found on the BCM7278 SoC. This requires us to update the compatible string (and associated binding document) as well as the Kconfig option to make that driver selectable with ARCH_BRCMSTB gating the enabling of such SoCs. Thank you Florian

[PATCH 1/2] dt-bindings: rng: Document BCM7278 RNG200 compatible

2017-11-01 Thread Florian Fainelli
BCM7278 includes a RGN200 hardware random number generator, document the compatible string for that version of the IP. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt | 4 +++- 1 file changed, 3 insertions(+), 1 de

[PATCH 2/2] hwrng: iproc-rng200: Add support for BCM7278

2017-11-01 Thread Florian Fainelli
BCM7278 features a RNG200 hardware random number generator block, add support for this chip by matching the chip-specific compatible string and extending the Kconfig dependencies to allow building on ARCH_BRCMSTB (base platform for 7278). Signed-off-by: Florian Fainelli <f.faine...@gmail.

Re: [PATCH 1/1] ARM: dts: NSP: Add crypto (SPU) to dtsi

2017-03-17 Thread Florian Fainelli
On 03/06/2017 11:22 AM, Florian Fainelli wrote: > On 02/28/2017 12:31 PM, Florian Fainelli wrote: >> On 02/22/2017 01:22 PM, Steve Lin wrote: >>> Adds crypto hardware (SPU) to Northstar Plus device tree file. >>> >>> Signed-off-by: Steve Lin <steven.l

Re: [PATCH 1/1] ARM: dts: NSP: Add crypto (SPU) to dtsi

2017-03-06 Thread Florian Fainelli
On 02/28/2017 12:31 PM, Florian Fainelli wrote: > On 02/22/2017 01:22 PM, Steve Lin wrote: >> Adds crypto hardware (SPU) to Northstar Plus device tree file. >> >> Signed-off-by: Steve Lin <steven.l...@broadcom.com> > > Applied, thanks! And dropped, since there

Re: [PATCH 1/1] ARM: dts: NSP: Add crypto (SPU) to dtsi

2017-02-28 Thread Florian Fainelli
On 02/22/2017 01:22 PM, Steve Lin wrote: > Adds crypto hardware (SPU) to Northstar Plus device tree file. > > Signed-off-by: Steve Lin Applied, thanks! -- Florian

Re: [PATCH v4 0/3] Add Broadcom SPU Crypto Driver

2017-02-28 Thread Florian Fainelli
On 02/13/2017 07:11 AM, Jon Mason wrote: > On Sat, Feb 11, 2017 at 5:54 AM, Herbert Xu > wrote: >> On Fri, Feb 03, 2017 at 12:55:31PM -0500, Rob Rice wrote: >>> Changes in v4: >>> - Added Rob Herring's Acked-by to patch 1/3 for bindings doc >>> - In response to

Re: [PATCH v3 0/3] Add Broadcom SPU Crypto Driver

2017-01-30 Thread Florian Fainelli
On 01/25/2017 08:44 AM, Rob Rice wrote: > Changes in v3: > - rebase to 4.10-rc3 in cryptodev-2.6 tree > - in bindings doc, list all valid compatibility strings > - rename DT nodes "crypto" rather than "spu-crypto" > - include a separate DT node for each SPU hardware block. Previously, > there was

Re: [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node

2016-06-27 Thread Florian Fainelli
On 06/22/2016 05:27 PM, Florian Fainelli wrote: > Add the DT node for the random number generator peripheral. > > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> Applied -- Florian -- To unsubscribe from this list: send the line "unsubscribe linux-crypto"

Re: [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x

2016-06-24 Thread Florian Fainelli
On 06/24/2016 06:31 AM, Herbert Xu wrote: > On Wed, Jun 22, 2016 at 05:27:02PM -0700, Florian Fainelli wrote: >> The Broadcom BCM5301x SoCs (Northstar) utilize the same random number >> generator peripheral as Northstar Plus and BCM2835, but just like the >> NSP S

[PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node

2016-06-22 Thread Florian Fainelli
Add the DT node for the random number generator peripheral. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- arch/arm/boot/dts/bcm5301x.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi index 7d4d29

[PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding

2016-06-22 Thread Florian Fainelli
Document the binding used by the Broadcom BCM5301x (Northstar) SoC random number generator. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- Documentation/devicetree/bindings/rng/brcm,bcm2835.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documen

[PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x

2016-06-22 Thread Florian Fainelli
The Broadcom BCM5301x SoCs (Northstar) utilize the same random number generator peripheral as Northstar Plus and BCM2835, but just like the NSP SoC, we need to enable the interrupt. Signed-off-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/char/hw_random/Kconfig | 2 +- d

[PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x

2016-06-22 Thread Florian Fainelli
Hi all, This patch series adds support for the Broadcom BCM5301x SoCs random number generator which is the same block as the one found in NSP and BCM2835. Florian Fainelli (3): Documentation: devicetree: bindings: Add BCM5301x binding hw_random: bcm2835: Add support for Broadcom BCM5301x

Re: [PATCH v2 0/4] hw rng support for NSP SoC

2016-05-31 Thread Florian Fainelli
On 05/31/2016 03:19 AM, Herbert Xu wrote: > On Fri, May 27, 2016 at 06:10:37AM -0400, Yendapally Reddy Dhananjaya Reddy > wrote: >> This patchset contains the hw random number generator support for the >> Broadcom's NSP SoC. The block is similar to the block available in >> bcm2835 with different

[PATCH 4/4] hw_random: bcm63xx-rng: use devm_* helpers

2015-02-16 Thread Florian Fainelli
Simplify the driver's probe function and error handling by using the device managed allocators, while at it, drop the redundant out of memory messages since these are already printed by the allocator. Signed-off-by: Florian Fainelli f.faine...@gmail.com --- drivers/char/hw_random/bcm63xx-rng.c

[PATCH 2/4] hw_random: bcm63xx-rng: move register definitions to driver

2015-02-16 Thread Florian Fainelli
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h contains the register definitions for this random number generator block, incorporate these register definitions directly into the bcm63xx-rng driver so we do not rely on this header to be provided. Signed-off-by: Florian Fainelli f.faine

[PATCH 3/4] MIPS: BCM63xx: remove RSET_RNG register definitions

2015-02-16 Thread Florian Fainelli
Now that these definitions have been moved to drivers/char/hw_random/bcm63xx-rng.c where they belong to make the driver standalone, we can safely remove these definitions from bcm63xx_regs.h. Signed-off-by: Florian Fainelli f.faine...@gmail.com --- arch/mips/include/asm/mach-bcm63xx