[U-Boot-Users] [PATCH/RFC] mpc5200: switch to CONFIG_OF_LIBFDT

Bartlomiej Sieka tur at semihalf.com
Mon Sep 3 22:36:56 CEST 2007


On Thu, Aug 30, 2007 at 12:20:14PM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely at secretlab.ca>
> 
> Here is a patch which converts the icecube* and tqm5200 boards from using
> OF_FLAT_TREE to OF_LIBFDT.  It also fixes the compile of cm5200.
> 
> It's been tested on the lite5200.

Tested also on motionpro, with the below patch that converts it to OF_LIBFDT.

Grant: perhaps it would be a good idea to merge this patch with your
upcoming updated patch for icecube and tqm5200?

Regards,
Bartlomiej

diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c
index 6eb5fe9..f83998e 100644
--- a/board/motionpro/motionpro.c
+++ b/board/motionpro/motionpro.c
@@ -29,9 +29,7 @@
 #include <common.h>
 #include <mpc5xxx.h>
 #include <miiphy.h>
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-#endif
+#include <libfdt.h>
 
 #if defined(CONFIG_STATUS_LED)
 #include <status_led.h>
@@ -196,12 +194,12 @@ int checkboard(void)
 }
 
 
-#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
 	ft_cpu_setup(blob, bd);
 }
-#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
 
 
 #if defined(CONFIG_STATUS_LED)
diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h
index 82827c6..9a21632 100644
--- a/include/configs/motionpro.h
+++ b/include/configs/motionpro.h
@@ -417,7 +417,7 @@ extern void __led_set(led_id_t id, int state);
 #define CFG_RESET_ADDRESS	0xfff00100
 
 /* pass open firmware flat tree */
-#define CONFIG_OF_FLAT_TREE	1
+#define CONFIG_OF_LIBFDT	1
 #define CONFIG_OF_BOARD_SETUP	1
 
 #define OF_CPU			"PowerPC,5200 at 0"




More information about the U-Boot mailing list