From 589c04271d129729a8b01391453851ab9cc4069c Mon Sep 17 00:00:00 2001 From: Gerald Van Baren Date: Tue, 3 Jun 2008 20:24:58 -0400 Subject: Convert mpc7448hpc2 to CONFIG_OF_LIBFDT This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change to CONFIG_OF_LIBFDT. WARNING: This conversion is untested because I do not have a board to test it on. NOTE: The FDT blob (DTS) must have an /aliases/ethernet0 and (optionally) /aliases/ethernet1 property for the ethernet to work. Signed-off-by: Gerald Van Baren --- board/freescale/mpc7448hpc2/mpc7448hpc2.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'board') diff --git a/board/freescale/mpc7448hpc2/mpc7448hpc2.c b/board/freescale/mpc7448hpc2/mpc7448hpc2.c index 81846eba77..fcbebc0e2d 100644 --- a/board/freescale/mpc7448hpc2/mpc7448hpc2.c +++ b/board/freescale/mpc7448hpc2/mpc7448hpc2.c @@ -105,3 +105,12 @@ ft_board_setup (void *blob, bd_t *bd) } } #endif + +#if defined(CONFIG_OF_BOARD_SETUP) +void +ft_board_setup(void *blob, bd_t *bd) +{ + ft_cpu_setup(blob, bd); + fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); +} +#endif -- cgit v1.2.3 From fec6d9ee7c10443f65ce1788ef818919167bbf2e Mon Sep 17 00:00:00 2001 From: Gerald Van Baren Date: Tue, 3 Jun 2008 20:34:45 -0400 Subject: Remove the deprecated CONFIG_OF_FLAT_TREE 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 --- board/freescale/mpc7448hpc2/mpc7448hpc2.c | 22 +--------------------- board/tqm8272/tqm8272.c | 4 ---- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'board') diff --git a/board/freescale/mpc7448hpc2/mpc7448hpc2.c b/board/freescale/mpc7448hpc2/mpc7448hpc2.c index fcbebc0e2d..f6cd192a81 100644 --- a/board/freescale/mpc7448hpc2/mpc7448hpc2.c +++ b/board/freescale/mpc7448hpc2/mpc7448hpc2.c @@ -31,10 +31,7 @@ #include #include <74xx_7xx.h> -#if defined(CONFIG_OF_FLAT_TREE) -#include -extern void ft_cpu_setup (void *blob, bd_t *bd); -#endif +#include #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 7bd64012c4..ec1a37c7f9 100644 --- a/board/tqm8272/tqm8272.c +++ b/board/tqm8272/tqm8272.c @@ -30,10 +30,6 @@ #include #include #endif -#if CONFIG_OF_FLAT_TREE -#include -#include -#endif #if 0 #define deb_printf(fmt,arg...) \ -- cgit v1.2.3