public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Neha Malcom Francis <n-francis@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>,
	Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Cc: <u-boot@lists.denx.de>, Andrew Davis <afd@ti.com>
Subject: [PATCH 1/2] firmware: ti_sci: Bind sysreset driver when enabled
Date: Tue, 2 Apr 2024 11:09:07 -0500	[thread overview]
Message-ID: <20240402160908.508974-2-afd@ti.com> (raw)
In-Reply-To: <20240402160908.508974-1-afd@ti.com>

The sysreset TI-SCI API is available with TI-SCI always, there is no need
for a DT node to describe the availability of this. If the sysreset driver
is available then bind it during ti-sci probe.

Remove the unneeded device tree matching.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 drivers/firmware/ti_sci.c          | 7 +++++++
 drivers/sysreset/sysreset-ti-sci.c | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index ee092185588..6c581b9df9c 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -16,6 +16,7 @@
 #include <dm/device.h>
 #include <dm/device_compat.h>
 #include <dm/devres.h>
+#include <dm/lists.h>
 #include <linux/bitops.h>
 #include <linux/compat.h>
 #include <linux/err.h>
@@ -2840,6 +2841,12 @@ static int ti_sci_probe(struct udevice *dev)
 
 	INIT_LIST_HEAD(&info->dev_list);
 
+	if (IS_ENABLED(CONFIG_SYSRESET_TI_SCI)) {
+		ret = device_bind_driver(dev, "ti-sci-sysreset", "sysreset", NULL);
+		if (ret)
+			dev_warn(dev, "cannot bind SYSRESET (ret = %d)\n", ret);
+	}
+
 	return 0;
 }
 
diff --git a/drivers/sysreset/sysreset-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c
index 5fc05c46cb0..0de132633a8 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -60,15 +60,9 @@ static struct sysreset_ops ti_sci_sysreset_ops = {
 	.request = ti_sci_sysreset_request,
 };
 
-static const struct udevice_id ti_sci_sysreset_of_match[] = {
-	{ .compatible = "ti,sci-sysreset", },
-	{ /* sentinel */ },
-};
-
 U_BOOT_DRIVER(ti_sci_sysreset) = {
 	.name = "ti-sci-sysreset",
 	.id = UCLASS_SYSRESET,
-	.of_match = ti_sci_sysreset_of_match,
 	.probe = ti_sci_sysreset_probe,
 	.priv_auto	= sizeof(struct ti_sci_sysreset_data),
 	.ops = &ti_sci_sysreset_ops,
-- 
2.39.2


  reply	other threads:[~2024-04-02 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 16:09 [PATCH 0/2] Remove ti,sci-sysreset Andrew Davis
2024-04-02 16:09 ` Andrew Davis [this message]
2024-04-03  6:34   ` [PATCH 1/2] firmware: ti_sci: Bind sysreset driver when enabled Neha Malcom Francis
2024-04-10 19:37   ` Jon Humphreys
2024-04-02 16:09 ` [PATCH 2/2] arm: dts: k3: Remove unneeded ti, sci-sysreset binding and nodes Andrew Davis
2024-04-03  6:37   ` Neha Malcom Francis
2024-04-03 14:21     ` Andrew Davis
2024-04-10 19:37   ` Jon Humphreys
2024-04-12 14:19 ` [PATCH 0/2] Remove ti,sci-sysreset Tom Rini

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=20240402160908.508974-2-afd@ti.com \
    --to=afd@ti.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.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