[U-Boot-Users] [PATCH 3/3] Remove the deprecated CONFIG_OF_FLAT_TREE

Jerry Van Baren gvb.uboot at gmail.com
Tue Jun 3 01:55:49 CEST 2008


Use CONFIG_OF_LIBFDT instead to support flattened device trees.  It is
cleaner, has better functionality, and is better supported.

Signed-off-by: Gerald Van Baren <vanbaren at cideas.com>
---
 README                                    |    9 +--------
 board/freescale/mpc7448hpc2/mpc7448hpc2.c |   22 +---------------------
 board/tqm8272/tqm8272.c                   |    4 ----
 cpu/74xx_7xx/cpu.c                        |    4 ----
 include/configs/mpc7448hpc2.h             |    1 +
 5 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/README b/README
index f14fb7b..21f4470 100644
--- a/README
+++ b/README
@@ -350,7 +350,7 @@ The following options need to be configured:
 		expect it to be in bytes, others in MB.
 		Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
 
-		CONFIG_OF_LIBFDT / CONFIG_OF_FLAT_TREE
+		CONFIG_OF_LIBFDT
 
 		New kernel versions are expecting firmware settings to be
 		passed using flattened device trees (based on open firmware
@@ -361,13 +361,6 @@ The following options need to be configured:
 		 * Adds the "fdt" command
 		 * The bootm command automatically updates the fdt
 
-		CONFIG_OF_FLAT_TREE
-		 * Deprecated, see CONFIG_OF_LIBFDT
-		 * Original ft_build.c-based support
-		 * Automatically modifies the dft as part of the bootm command
-		 * The environment variable "disable_of", when set,
-		     disables this functionality.
-
 		OF_CPU - The proper name of the cpus node.
 		OF_SOC - The proper name of the soc node.
 		OF_TBCLK - The timebase frequency.
diff --git a/board/freescale/mpc7448hpc2/mpc7448hpc2.c b/board/freescale/mpc7448hpc2/mpc7448hpc2.c
index fcbebc0..f6cd192 100644
--- a/board/freescale/mpc7448hpc2/mpc7448hpc2.c
+++ b/board/freescale/mpc7448hpc2/mpc7448hpc2.c
@@ -31,10 +31,7 @@
 
 #include <common.h>
 #include <74xx_7xx.h>
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-extern void ft_cpu_setup (void *blob, bd_t *bd);
-#endif
+#include <fdt_support.h>
 
 #undef	DEBUG
 
@@ -89,23 +86,6 @@ long int initdram (int board_type)
 	return dram_size (board_type);
 }
 
-#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
-void
-ft_board_setup (void *blob, bd_t *bd)
-{
-	u32 *p;
-	int len;
-
-	ft_cpu_setup (blob, bd);
-
-	p = ft_get_prop (blob, "/memory/reg", &len);
-	if (p != NULL) {
-		*p++ = cpu_to_be32 (bd->bi_memstart);
-		*p = cpu_to_be32 (bd->bi_memsize);
-	}
-}
-#endif
-
 #if defined(CONFIG_OF_BOARD_SETUP)
 void
 ft_board_setup(void *blob, bd_t *bd)
diff --git a/board/tqm8272/tqm8272.c b/board/tqm8272/tqm8272.c
index 7bd6401..ec1a37c 100644
--- a/board/tqm8272/tqm8272.c
+++ b/board/tqm8272/tqm8272.c
@@ -30,10 +30,6 @@
 #include <pci.h>
 #include <asm/m8260_pci.h>
 #endif
-#if CONFIG_OF_FLAT_TREE
-#include <ft_build.h>
-#include <image.h>
-#endif
 
 #if 0
 #define deb_printf(fmt,arg...) \
diff --git a/cpu/74xx_7xx/cpu.c b/cpu/74xx_7xx/cpu.c
index a6e3426..ea43c9a 100644
--- a/cpu/74xx_7xx/cpu.c
+++ b/cpu/74xx_7xx/cpu.c
@@ -49,10 +49,6 @@
 #include <fdt_support.h>
 #endif
 
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-#endif
-
 #ifdef CONFIG_AMIGAONEG3SE
 #include "../board/MAI/AmigaOneG3SE/via686.h"
 #include "../board/MAI/AmigaOneG3SE/memio.h"
diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h
index c01d0a5..689b4ad 100644
--- a/include/configs/mpc7448hpc2.h
+++ b/include/configs/mpc7448hpc2.h
@@ -58,6 +58,7 @@
 #define CONFIG_BOARD_EARLY_INIT_R
 #define CONFIG_MISC_INIT_R
 
+#define CONFIG_HAS_ETH0
 #define CONFIG_HAS_ETH1
 
 #define CONFIG_ENV_OVERWRITE
-- 
1.5.5.1





More information about the U-Boot mailing list