[PATCH v2 17/27] fdt: Move working_fdt into fdt_support

Simon Glass sjg at chromium.org
Sun Oct 8 01:12:36 CEST 2023


This can be accessed even when commands are not enabled. Move it into
the fdt_support.c file, which is where most of the FDT helpers are.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 boot/fdt_support.c | 5 +++++
 cmd/fdt.c          | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/boot/fdt_support.c b/boot/fdt_support.c
index 5e49078f8c35..6ae7b8e20f65 100644
--- a/boot/fdt_support.c
+++ b/boot/fdt_support.c
@@ -23,6 +23,11 @@
 #include <fdtdec.h>
 #include <version.h>
 
+/*
+ * The working_fdt points to our working flattened device tree.
+ */
+struct fdt_header *working_fdt;
+
 /**
  * fdt_getprop_u32_default_node - Return a node's property or a default
  *
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 331564c13be9..86e847a41826 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -31,11 +31,6 @@ static int fdt_parse_prop(char *const*newval, int count, char *data, int *len);
 static int fdt_print(const char *pathp, char *prop, int depth);
 static int is_printable_string(const void *data, int len);
 
-/*
- * The working_fdt points to our working flattened device tree.
- */
-struct fdt_header *working_fdt;
-
 static void set_working_fdt_addr_quiet(ulong addr)
 {
 	void *buf;
-- 
2.42.0.609.gbb76f46606-goog



More information about the U-Boot mailing list