[PATCH 1/2] hwrng: meson: expose RNG0 clock via DT
Jerome Brunet
jbrunet at baylibre.com
Mon Feb 20 02:07:23 PST 2017
On Sun, 2017-02-19 at 21:33 +0100, Heiner Kallweit wrote:
> Expose the RNG0 clock via DT.
>
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +-
> arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 5 +++++
> include/dt-bindings/clock/gxbb-clkc.h | 1 +
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 5d995f77..620495a4 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -380,7 +380,7 @@
> #size-cells = <2>;
> ranges = <0x0 0x0 0x0 0xc8834000 0x0
> 0x2000>;
>
> - rng {
> + hwrng: rng {
> compatible = "amlogic,meson-rng";
> reg = <0x0 0x0 0x0 0x4>;
> };
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> index 04b3324b..a375cb21 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> @@ -524,3 +524,8 @@
> &vpu {
> compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-
> vpu";
> };
> +
> +&hwrng {
> + clocks = <&clkc CLKID_RNG0>;
> + clock-names = "core";
> +};
> diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-
> bindings/clock/gxbb-clkc.h
> index 692846c7..473676b1 100644
> --- a/include/dt-bindings/clock/gxbb-clkc.h
> +++ b/include/dt-bindings/clock/gxbb-clkc.h
> @@ -15,6 +15,7 @@
> #define CLKID_SPI 34
> #define CLKID_I2C 22
> #define CLKID_SAR_ADC 23
> +#define CLKID_RNG0 25
Shouldn't you comment out the corresponding "define" in
drivers/clk/meson/gxbb.h ?
I don't know if it is rule, but we usually "expose" the clock (moving
the define from drivers/clk/meson/gxbb.h to include/dt-
bindings/clock/gxbb-clkc.h) in a dedicated patch, with the subject
starting with "clk: gxbb: expose foobar clock". It helps the
maintainers of the subsystem to give their ack.
For this to happen, please remember the patch should be sent to them as
well. Here you are missing the clock and dt guys:
* Stephen Boyd <sboyd at codeaurora.org>
* Michael Turquette <mturquette at baylibre.com>
* linux-clk at vger.kernel.org
* devicetree at vger.kernel.org
scripts/get_maintainer.pl can help you finding all people your patch
should be sent to.
The remaining part of this patch involves DT, so the subject should
start with "ARM64: dts: meson-gx:"
You also need to add devicetree at vger.kernel.org in CC.
Apart from these minor remarks, the patchset looks good to me.
Thx !
> #define CLKID_ETH 36
> #define CLKID_USB0 50
> #define CLKID_USB1 51
More information about the linux-amlogic
mailing list