On 02/19/2017 09:30 PM, Heiner Kallweit wrote:
The HW randon number generator requires a clock and we shouldn't rely
on the boot loader to enable it.
Heiner Kallweit (2):
hwrng: meson: expose RNG0 clock via DT
hwrng: meson: add clock handling to driver
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +-
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++
drivers/char/hw_random/meson-rng.c | 27 ++++++++++++++++++++++++++-
include/dt-bindings/clock/gxbb-clkc.h | 1 +
4 files changed, 33 insertions(+), 2 deletions(-)
Hi Heiner,
Thanks for the fix, but can you also update the dt-bindings document ?
Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt
I also think this clock should be optional, to keep driver working using old bindings, set the core_clk to NULL if not available, clock_prepare_enable and clock_disable_unprepare won't fail with a NULL clock
Neil