public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: matthias.bgg at kernel.org <matthias.bgg@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] libfdt: Make fdt_cells function accessible
Date: Wed,  8 Apr 2020 11:35:27 +0200	[thread overview]
Message-ID: <20200408093528.24276-2-matthias.bgg@kernel.org> (raw)
In-Reply-To: <20200408093528.24276-1-matthias.bgg@kernel.org>

From: Matthias Brugger <mbrugger@suse.com>

For reading address-cells and size-cells, the libfdt only provides
functions which do not return in case the node does not provide the
property. For traversing the DT to find the parent node which provides
this property we will need to know that.

Make fdt_cells accessible from outside of libfdt so that we can detect
not present size- and address-cells properties in a node.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---

 scripts/dtc/libfdt/fdt_addresses.c | 2 +-
 scripts/dtc/libfdt/libfdt.h        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c
index 9a82cd0ba2..ead9460e95 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -11,7 +11,7 @@
 
 #include "libfdt_internal.h"
 
-static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
+int fdt_cells(const void *fdt, int nodeoffset, const char *name)
 {
 	const fdt32_t *c;
 	uint32_t val;
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index fa63fffe28..b0eca12491 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1121,6 +1121,8 @@ const char *fdt_stringlist_get(const void *fdt, int nodeoffset,
  */
 #define FDT_MAX_NCELLS		4
 
+int fdt_cells(const void *fdt, int nodeoffset, const char *name);
+
 /**
  * fdt_address_cells - retrieve address size for a bus represented in the tree
  * @fdt: pointer to the device tree blob
-- 
2.26.0

  reply	other threads:[~2020-04-08  9:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  9:35 [PATCH 0/2] Reading size-cells and address-cells from a node should walk up the matthias.bgg at kernel.org
2020-04-08  9:35 ` matthias.bgg at kernel.org [this message]
2020-04-09 16:25   ` [PATCH 1/2] libfdt: Make fdt_cells function accessible Simon Glass
2020-04-08  9:35 ` [PATCH 2/2] dm: core: Walk the tree to find address- and size-cells properties matthias.bgg at kernel.org
2020-04-09 16:25   ` Simon Glass
2020-04-11 18:05     ` Matthias Brugger
2020-04-19 23:37       ` Simon Glass
2020-04-08 14:48 ` [PATCH 0/2] Reading size-cells and address-cells from a node should walk up the Robin Randhawa

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=20200408093528.24276-2-matthias.bgg@kernel.org \
    --to=matthias.bgg@kernel.org \
    --cc=u-boot@lists.denx.de \
    /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