u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] remoteproc: migrate uclass to livetree
@ 2021-09-20 15:56 Patrick Delaunay
  2021-09-21  1:11 ` Simon Glass
  2021-10-05 22:02 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2021-09-20 15:56 UTC (permalink / raw)
  To: u-boot
  Cc: Patrick Delaunay, Andy Shevchenko, Pratyush Yadav, Simon Glass,
	U-Boot STM32

Use dev_ function to read the name and boolean to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 drivers/remoteproc/rproc-uclass.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index 64c47c1e72..87e1ec7ad7 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -9,19 +9,15 @@
 #define pr_fmt(fmt) "%s: " fmt, __func__
 #include <common.h>
 #include <errno.h>
-#include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
 #include <remoteproc.h>
-#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
 #include <dm.h>
 #include <dm/uclass.h>
 #include <dm/uclass-internal.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /**
  * for_each_remoteproc_device() - iterate through the list of rproc devices
  * @fn: check function to call per match, if this function returns fail,
@@ -121,21 +117,13 @@ static int rproc_pre_probe(struct udevice *dev)
 
 	if (!dev_get_plat(dev)) {
 #if CONFIG_IS_ENABLED(OF_CONTROL)
-		int node = dev_of_offset(dev);
-		const void *blob = gd->fdt_blob;
 		bool tmp;
-		if (!blob) {
-			debug("'%s' no dt?\n", dev->name);
-			return -EINVAL;
-		}
 		debug("'%s': using fdt\n", dev->name);
-		uc_pdata->name = fdt_getprop(blob, node,
-					     "remoteproc-name", NULL);
+		uc_pdata->name = dev_read_string(dev, "remoteproc-name");
 
 		/* Default is internal memory mapped */
 		uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
-		tmp = fdtdec_get_bool(blob, node,
-				      "remoteproc-internal-memory-mapped");
+		tmp = dev_read_bool(dev, "remoteproc-internal-memory-mapped");
 		if (tmp)
 			uc_pdata->mem_type = RPROC_INTERNAL_MEMORY_MAPPED;
 #else
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: migrate uclass to livetree
  2021-09-20 15:56 [PATCH] remoteproc: migrate uclass to livetree Patrick Delaunay
@ 2021-09-21  1:11 ` Simon Glass
  2021-10-05 22:02 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-09-21  1:11 UTC (permalink / raw)
  To: Patrick Delaunay
  Cc: U-Boot Mailing List, Andy Shevchenko, Pratyush Yadav, U-Boot STM32

On Mon, 20 Sept 2021 at 09:56, Patrick Delaunay
<patrick.delaunay@foss.st.com> wrote:
>
> Use dev_ function to read the name and boolean to support a live tree.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
>  drivers/remoteproc/rproc-uclass.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: migrate uclass to livetree
  2021-09-20 15:56 [PATCH] remoteproc: migrate uclass to livetree Patrick Delaunay
  2021-09-21  1:11 ` Simon Glass
@ 2021-10-05 22:02 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-10-05 22:02 UTC (permalink / raw)
  To: Patrick Delaunay
  Cc: u-boot, Andy Shevchenko, Pratyush Yadav, Simon Glass, U-Boot STM32

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

On Mon, Sep 20, 2021 at 05:56:06PM +0200, Patrick Delaunay wrote:

> Use dev_ function to read the name and boolean to support a live tree.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-05 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 15:56 [PATCH] remoteproc: migrate uclass to livetree Patrick Delaunay
2021-09-21  1:11 ` Simon Glass
2021-10-05 22:02 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).