linux
linux copied to clipboard
platform_get_resource fails when it is a child of a simple-mfd node
This fails to load the timeriomem_rng driver:
syscon: syscon@1e6e2000 {
compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd";
reg = <0x1e6e2000 0x1a8>;
#address-cells = <1>;
#size-cells = <0>;
#clock-cells = <1>;
#reset-cells = <1>;
hwrng@78 {
compatible = "timeriomem_rng";
reg = <0x1e6e2078 0x4>;
period = <1>;
quality = <100>;
};
};
The line that fails is in drivers/char/hw_random/timeriomem-rng.c timeriomem_rng_probe:
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
If I move the hwrng node out of the syscon, it does load.