summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Gibbons <[email protected]>2026-07-22 16:45:45 +0100
committerLeo Yu-Chi Liang <[email protected]>2026-08-05 02:03:29 -0700
commit752704d854fd22985470b03df8d4b303c265b307 (patch)
tree303b896acc4b0fb2e4dc9b351477a8f0c391dfa4
parenta5f93037f28624c612288e2d97604d73e03af5a3 (diff)
misc: mpfs_syscontroller: bind RNG sub-device
The MPFS RNG driver is not described by the device tree and is instead registered dynamically by the system controller. Explicitly bind the MPFS RNG driver as a child device during system controller probe. This ensures the RNG device is instantiated and available via UCLASS_RNG without requiring a device tree node. Signed-off-by: Jamie Gibbons <[email protected]> Acked-by: Conor Dooley <[email protected]>
-rw-r--r--drivers/misc/mpfs_syscontroller.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/mpfs_syscontroller.c b/drivers/misc/mpfs_syscontroller.c
index d29cb2e9e59..b9aea7e1181 100644
--- a/drivers/misc/mpfs_syscontroller.c
+++ b/drivers/misc/mpfs_syscontroller.c
@@ -11,6 +11,7 @@
#include <asm/system.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <dm/lists.h>
#include <env.h>
#include <errno.h>
#include <linux/compat.h>
@@ -334,6 +335,7 @@ EXPORT_SYMBOL(mpfs_syscontroller_process_dtbo);
static int mpfs_syscontroller_probe(struct udevice *dev)
{
struct mpfs_syscontroller_priv *sys_controller = dev_get_priv(dev);
+ struct udevice *rng_dev;
int ret;
ret = mbox_get_by_index(dev, 0, &sys_controller->chan);
@@ -343,6 +345,10 @@ static int mpfs_syscontroller_probe(struct udevice *dev)
return ret;
}
+ ret = device_bind_driver(dev, "mpfs_rng", "mpfs-rng", &rng_dev);
+ if (ret)
+ dev_err(dev, "Failed to bind mpfs_rng: %d\n", ret);
+
init_completion(&sys_controller->c);
dev_info(dev, "Registered MPFS system controller\n");