U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Gibbons <jamie.gibbons@microchip.com>
To: <u-boot@lists.denx.de>
Cc: Conor Dooley <conor.dooley@microchip.com>,
	Valentina Fernandez Alanis
	<valentina.fernandezalanis@microchip.com>,
	Tom Rini <trini@konsulko.com>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Leo Yu-Chi Liang <ycliang@andestech.com>,
	Sughosh Ganu <sughosh.ganu@arm.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	Martin Herren <sputnik@on-the-web.ch>,
	Michal Simek <michal.simek@amd.com>,
	Adriana Nicolae <adriana@arista.com>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	<jamie.gibbons@microchip.com>
Subject: [PATCH 3/8] misc: mpfs_syscontroller: bind RNG sub-device
Date: Thu, 25 Jun 2026 13:23:20 +0100	[thread overview]
Message-ID: <20260625122325.834568-4-jamie.gibbons@microchip.com> (raw)
In-Reply-To: <20260625122325.834568-1-jamie.gibbons@microchip.com>

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 <jamie.gibbons@microchip.com>
---
 drivers/misc/mpfs_syscontroller.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/misc/mpfs_syscontroller.c b/drivers/misc/mpfs_syscontroller.c
index 61d6780f0b9..79dc43f085f 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>
@@ -332,6 +333,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);
@@ -341,6 +343,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");
 
-- 
2.43.0


  parent reply	other threads:[~2026-06-25 13:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 12:23 [PATCH 0/8] MPFS: add hardware RNG support and fix RNG consumers Jamie Gibbons
2026-06-25 12:23 ` [PATCH 1/8] cmd: rng: fix error handling for dm_rng_read() Jamie Gibbons
2026-06-25 14:38   ` Simon Glass
2026-06-25 12:23 ` [PATCH 2/8] misc: mpfs_syscontroller: add mailbox RX helper for service responses Jamie Gibbons
2026-07-01  9:45   ` Conor Dooley
2026-06-25 12:23 ` Jamie Gibbons [this message]
2026-07-01  9:52   ` [PATCH 3/8] misc: mpfs_syscontroller: bind RNG sub-device Conor Dooley
2026-06-25 12:23 ` [PATCH 4/8] rng: add Microchip PolarFire SoC hardware RNG driver Jamie Gibbons
2026-07-01  9:55   ` Conor Dooley
2026-06-25 12:23 ` [PATCH 5/8] configs: microchip_mpfs_generic: enable MPFS RNG support Jamie Gibbons
2026-07-01 10:04   ` Conor Dooley
2026-06-25 12:23 ` [PATCH 6/8] mailbox: mpfs-mbox: replace unbounded BUSY polling with bounded waits Jamie Gibbons
2026-07-01 10:05   ` Conor Dooley
2026-06-25 12:23 ` [PATCH 7/8] mailbox: mpfs: add bounded wait for BUSY to clear before sending request Jamie Gibbons
2026-07-01 10:06   ` Conor Dooley
2026-06-25 12:23 ` [PATCH 8/8] boot: fdt: downgrade KASLR RNG failure to warning Jamie Gibbons
2026-06-25 14:38   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260625122325.834568-4-jamie.gibbons@microchip.com \
    --to=jamie.gibbons@microchip.com \
    --cc=adriana@arista.com \
    --cc=conor.dooley@microchip.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=michal.simek@amd.com \
    --cc=semen.protsenko@linaro.org \
    --cc=sputnik@on-the-web.ch \
    --cc=sughosh.ganu@arm.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=valentina.fernandezalanis@microchip.com \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox