]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
firmware: ti_sci: Bind sysreset driver when enabled
authorAndrew Davis <afd@ti.com>
Tue, 2 Apr 2024 16:09:07 +0000 (11:09 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 12 Apr 2024 02:44:36 +0000 (20:44 -0600)
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>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
drivers/firmware/ti_sci.c
drivers/sysreset/sysreset-ti-sci.c

index ee092185588116ed5b1407a8c1fddd55e5255b16..6c581b9df9c0e3d8b234fc978ad87896b1cb0b45 100644 (file)
@@ -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;
 }
 
index 5fc05c46cb07c85776f7076eae5481959085b9a2..0de132633a8d8b78c098f3d48cdc1d226234cb92 100644 (file)
@@ -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,