This removes code that abused the device's platform data, interpreting
the driver platform data as if it was the uclass platform data.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---

 .../driver-model/remoteproc-framework.rst     | 29 -------------------
 drivers/remoteproc/rproc-uclass.c             | 18 +-----------
 drivers/remoteproc/sandbox_testproc.c         | 10 -------
 include/remoteproc.h                          |  2 --
 4 files changed, 1 insertion(+), 58 deletions(-)

diff --git a/doc/develop/driver-model/remoteproc-framework.rst 
b/doc/develop/driver-model/remoteproc-framework.rst
index bdbbb8ab7be..ce76e5ea495 100644
--- a/doc/develop/driver-model/remoteproc-framework.rst
+++ b/doc/develop/driver-model/remoteproc-framework.rst
@@ -106,35 +106,6 @@ provide a load and start function. We assume here that the 
device
 needs to be loaded and started, else, there is no real purpose of
 using the remoteproc framework.
 
-Describing the device using platform data
------------------------------------------
-
-*IMPORTANT* NOTE: THIS SUPPORT IS NOT MEANT FOR USE WITH NEWER PLATFORM
-SUPPORT. THIS IS ONLY FOR LEGACY DEVICES. THIS MODE OF INITIALIZATION
-*WILL* BE EVENTUALLY REMOVED ONCE ALL NECESSARY PLATFORMS HAVE MOVED
-TO DM/FDT.
-
-Considering that many platforms are yet to move to device-tree model,
-a simplified definition of a device is as follows:
-
-.. code-block:: c
-
-       struct dm_rproc_uclass_pdata proc_3_test = {
-               .name = "proc_3_legacy",
-               .driver_plat_data = &mydriver_data;
-       };
-
-       U_BOOT_DRVINFO(proc_3_demo) = {
-               .name = "sandbox_test_proc",
-               .plat = &proc_3_test,
-       };
-
-There can be additional data that may be desired depending on the
-remoteproc driver specific needs (for example: SoC integration
-details such as clock handle or something similar). See appropriate
-documentation for specific remoteproc driver for further details.
-These are passed via driver_plat_data.
-
 Describing the device using device tree
 ---------------------------------------
 
diff --git a/drivers/remoteproc/rproc-uclass.c 
b/drivers/remoteproc/rproc-uclass.c
index 3eacd4a8d9b..def43a8cf32 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -131,24 +131,8 @@ static int rproc_pre_probe(struct udevice *dev)
 
        /* See if we need to populate via fdt */
 
-       if (!dev_get_plat(dev)) {
-#if CONFIG_IS_ENABLED(OF_CONTROL)
-               bool tmp;
-               debug("'%s': using fdt\n", dev->name);
+       if (dev_has_ofnode(dev))
                uc_pdata->name = dev_read_string(dev, "remoteproc-name");
-#else
-               /* Nothing much we can do about this, can we? */
-               return -EINVAL;
-#endif
-
-       } else {
-               struct dm_rproc_uclass_pdata *pdata = dev_get_plat(dev);
-
-               debug("'%s': using legacy data\n", dev->name);
-               if (pdata->name)
-                       uc_pdata->name = pdata->name;
-               uc_pdata->driver_plat_data = pdata->driver_plat_data;
-       }
 
        /* Else try using device Name */
        if (!uc_pdata->name)
diff --git a/drivers/remoteproc/sandbox_testproc.c 
b/drivers/remoteproc/sandbox_testproc.c
index 4cb784ce32e..b19477daa7f 100644
--- a/drivers/remoteproc/sandbox_testproc.c
+++ b/drivers/remoteproc/sandbox_testproc.c
@@ -345,13 +345,3 @@ U_BOOT_DRIVER(sandbox_testproc) = {
        .probe = sandbox_testproc_probe,
        .priv_auto      = sizeof(struct sandbox_test_devdata),
 };
-
-/* TODO(n...@ti.com): Remove this along with non-DT support */
-static struct dm_rproc_uclass_pdata proc_3_test = {
-       .name = "proc_3_legacy",
-};
-
-U_BOOT_DRVINFO(proc_3_demo) = {
-       .name = "sandbox_test_proc",
-       .plat = &proc_3_test,
-};
diff --git a/include/remoteproc.h b/include/remoteproc.h
index 0c4d64706d9..e0fccb0177f 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -386,7 +386,6 @@ struct rproc {
 /**
  * struct dm_rproc_uclass_pdata - platform data for a CPU
  * @name: Platform-specific way of naming the Remote proc
- * @driver_plat_data: driver specific platform data that may be needed.
  *
  * This can be accessed with dev_get_uclass_plat() for any UCLASS_REMOTEPROC
  * device.
@@ -394,7 +393,6 @@ struct rproc {
  */
 struct dm_rproc_uclass_pdata {
        const char *name;
-       void *driver_plat_data;
 };
 
 /**
-- 
2.39.2

Reply via email to