ARM: dts: aspeed: Move random number device
Subsystems (2)
Joel Stanley
maintainerPATCH 1/1 ARM: dts: aspeed: Move random number device
Move the node out from under the syscon/simple-mfd.
Being a child of this node causes the driver to fail to probe, as platform_get_resource returns NULL due to dev->num_resources being zero.
--- arch/arm/boot/dts/aspeed-g4.dtsi | 12 ++++++------ arch/arm/boot/dts/aspeed-g5.dtsi | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/aspeed-g4.dtsi +6 -6
@@ -120,13 +120,13 @@ pinctrl: pinctrl { compatible = "aspeed,g4-pinctrl"; }; + }; - hwrng@78 { - compatible = "timeriomem_rng"; - reg = <0x78 0x4>; - period = <1>; - quality = <100>; - }; + rng: hwrng@78 { + compatible = "timeriomem_rng"; + reg = <0x78 0x4>; + period = <1>; + quality = <100>; }; adc: adc@1e6e9000 {
arch/arm/boot/dts/aspeed-g5.dtsi +6 -6
@@ -161,13 +161,13 @@ vga_scratch: scratch { compatible = "aspeed,bmc-misc"; }; + }; - hwrng@78 { - compatible = "timeriomem_rng"; - reg = <0x78 0x4>; - period = <1>; - quality = <100>; - }; + rng: hwrng@78 { + compatible = "timeriomem_rng"; + reg = <0x78 0x4>; + period = <1>; + quality = <100>; }; gfx: display@1e6e6000 {
Signature · 1 line
2.17.0
Quoted 4 lines · Joel Stanley
Move the node out from under the syscon/simple-mfd.
Being a child of this node causes the driver to fail to probe, as
platform_get_resourcereturns NULL due todev->num_resourcesbeing zero.
Ugh. I'm frustrated by the schism that simple-mfd/syscon introduces. It looks like such an attractive solution right up until its not, when you have existing drivers like this that you want to plug into MMIO space already covered by the syscon/simple-mfd.
Do we have a way out of this kind of mess?
What about adding regmap support to the timeriomem_rng driver?
Quoted 58 lines
Signed-off-by Joel Stanley <[email protected]>--- arch/arm/boot/dts/aspeed-g4.dtsi | 12 ++++++------ arch/arm/boot/dts/aspeed-g5.dtsi | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-)arch/arm/boot/dts/aspeed-g4.dtsi +6
-6@@ -120,13 +120,13 @@ pinctrl: pinctrl { compatible = "aspeed,g4-pinctrl"; }; + }; - hwrng@78 { - compatible = "timeriomem_rng"; - reg = <0x78 0x4>; - period = <1>; - quality = <100>; - }; + rng: hwrng@78 { + compatible = "timeriomem_rng"; + reg = <0x78 0x4>; + period = <1>; + quality = <100>; }; adc: adc@1e6e9000 {arch/arm/boot/dts/aspeed-g5.dtsi +6
-6@@ -161,13 +161,13 @@ vga_scratch: scratch { compatible = "aspeed,bmc-misc"; }; + }; - hwrng@78 { - compatible = "timeriomem_rng"; - reg = <0x78 0x4>; - period = <1>; - quality = <100>; - }; + rng: hwrng@78 { + compatible = "timeriomem_rng"; + reg = <0x78 0x4>; + period = <1>; + quality = <100>; }; gfx: display@1e6e6000 {Signature · 1 line
2.17.0
Joel Stanley
maintainerQuoted 11 lines · Andrew Jeffery
Quoted 4 lines · Joel Stanley
Move the node out from under the syscon/simple-mfd.
Being a child of this node causes the driver to fail to probe, as
platform_get_resourcereturns NULL due todev->num_resourcesbeing zero.Ugh. I'm frustrated by the schism that simple-mfd/syscon introduces. It looks like such an attractive solution right up until its not, when you have existing drivers like this that you want to plug into MMIO space already covered by the syscon/simple-mfd.
Do we have a way out of this kind of mess?
What about adding regmap support to the
timeriomem_rngdriver?
I'm sure that they would take patches, especially if it retains the current behaviour. Given how little it's reading from the one register, there are no concerns with overhead/performance.
In general, it would be good to not have to rewrite drivers in order to use them. Is it a matter of allowing more than one device to bind a of resource?