[U-Boot] [PATCH 11/29] fdt: Rename setup_fdt() and make it prepare also

Simon Glass sjg at chromium.org
Sat Feb 28 06:06:35 CET 2015


There is little reason to split these two functions. Bring them together
which simplifies the init sequence.

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

 common/board_f.c | 5 +----
 include/fdtdec.h | 2 +-
 lib/fdtdec.c     | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 2499664..eab0050 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -728,7 +728,7 @@ static init_fnc_t init_sequence_f[] = {
 #endif
 	setup_mon_len,
 #ifdef CONFIG_OF_CONTROL
-	setup_fdt,
+	fdtdec_setup,
 #endif
 #ifdef CONFIG_TRACE
 	trace_early_init,
@@ -740,9 +740,6 @@ static init_fnc_t init_sequence_f[] = {
 #endif
 	arch_cpu_init,		/* basic arch cpu dependent setup */
 	mark_bootstage,
-#ifdef CONFIG_OF_CONTROL
-	fdtdec_check_fdt,
-#endif
 	initf_dm,
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
 	board_early_init_f,
diff --git a/include/fdtdec.h b/include/fdtdec.h
index ea92c2b..a49a184 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -782,6 +782,6 @@ int fdtdec_decode_memory_region(const void *blob, int node,
 /**
  * Set up the device tree ready for use
  */
-int setup_fdt(void);
+int fdtdec_setup(void);
 
 #endif
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 4668217..67b2f34 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1038,7 +1038,7 @@ int fdtdec_decode_memory_region(const void *blob, int config_node,
 	return 0;
 }
 
-int setup_fdt(void)
+int fdtdec_setup(void)
 {
 #ifdef CONFIG_OF_CONTROL
 # ifdef CONFIG_OF_EMBED
@@ -1064,7 +1064,7 @@ int setup_fdt(void)
 						(uintptr_t)gd->fdt_blob);
 # endif
 #endif
-	return 0;
+	return fdtdec_prepare_fdt();
 }
 
 #endif /* !USE_HOSTCC */
-- 
2.2.0.rc0.207.ga3a616c



More information about the U-Boot mailing list