[PATCH v2 1/2] hwrng: iproc-rng200: Fix disable of the block.

2020-12-18 Thread matthias . bgg
From: Matthias Brugger When trying to disable the block we bitwise or the control register with value zero. This is confusing as using bitwise or with value zero doesn't have any effect at all. Drop this as we already set the enable bit to zero by appling inverted RNG_RBGEN_MASK. Signed-off-by:

[PATCH v2 2/2] hwrng: iproc-rng200: Move enable/disable in separate function

2020-12-18 Thread matthias . bgg
From: Matthias Brugger We are calling the same code for enable and disable the block in various parts of the driver. Put that code into a new function to reduce code duplication. Signed-off-by: Matthias Brugger Acked-by: Florian Fainelli --- Changes in v2: - rename function to iproc_rng200_e

[PATCH 1/2] hwrng: iproc-rng200: Fix disable of the block.

2020-12-14 Thread matthias . bgg
From: Matthias Brugger When trying to disable the block we bitwise or the control register with value zero. This will leave the block always turned on. Fix this by setting the corresponding bit to zero. Fixes: c83d45d5685f ("hwrng: iproc-rng200 - Add Broadcom IPROC RNG driver") Signed-off-by: Ma

[PATCH 2/2] hwrng: iproc-rng200: Move enable/disable in separate function

2020-12-14 Thread matthias . bgg
From: Matthias Brugger We are calling the same code for enable and disable the block in various parts of the driver. Put that code into a new function to reduce code duplication. Signed-off-by: Matthias Brugger --- drivers/char/hw_random/iproc-rng200.c | 37 --- 1 fil