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 --- include/configs/mpc7448hpc2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h index a218f75..3d71e22 100644 --- a/include/configs/mpc7448hpc2.h +++ b/include/configs/mpc7448hpc2.h @@ -75,7 +75,7 @@ #define CFG_PROMPT_HUSH_PS2 "> " /* 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,7448@0" -- cgit v1.1 From 62bcdda293efa752f8281fbd9da03822b27ce82f Mon Sep 17 00:00:00 2001 From: Gerald Van Baren Date: Tue, 3 Jun 2008 20:26:29 -0400 Subject: Change the stxxst to CONFIG_OF_LIBFDT This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change to CONFIG_OF_LIBFDT. WARNING: It appears that this board lost its ability to boot via a flattened device tree prior to this changeset. WARNING: This conversion was untested because I do not have a board to test it on. Signed-off-by: Gerald Van Baren --- include/configs/stxxtc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/stxxtc.h b/include/configs/stxxtc.h index 97a1032..fcafba5 100644 --- a/include/configs/stxxtc.h +++ b/include/configs/stxxtc.h @@ -590,8 +590,8 @@ typedef unsigned int led_id_t; /*****************************************************************************/ -/* pass open firmware flat tree */ -#define CONFIG_OF_FLAT_TREE 1 +/* pass open firmware flattened device tree */ +#define CONFIG_OF_LIBFDT 1 #define OF_CPU "PowerPC,MPC870@0" #define OF_TBCLK (MPC8XX_HZ / 16) -- cgit v1.1 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 --- include/configs/mpc7448hpc2.h | 1 + include/ft_build.h | 71 ------------------------------------------- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 include/ft_build.h (limited to 'include') diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h index 3d71e22..2f24967 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 diff --git a/include/ft_build.h b/include/ft_build.h deleted file mode 100644 index 89c689c..0000000 --- a/include/ft_build.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OF Flat tree builder - * - */ - -#ifndef FT_BUILD_H -#define FT_BUILD_H - -#include -#include - -/* Definitions used by the flattened device tree */ -#define OF_DT_HEADER 0xd00dfeed /* marker */ -#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */ -#define OF_DT_END_NODE 0x2 /* End node */ -#define OF_DT_PROP 0x3 /* Property: name off, size, - * content */ -#define OF_DT_NOP 0x4 /* nop */ -#define OF_DT_END 0x9 - -#define OF_DT_VERSION 0x10 - -struct boot_param_header { - u32 magic; /* magic word OF_DT_HEADER */ - u32 totalsize; /* total size of DT block */ - u32 off_dt_struct; /* offset to structure */ - u32 off_dt_strings; /* offset to strings */ - u32 off_mem_rsvmap; /* offset to memory reserve map */ - u32 version; /* format version */ - u32 last_comp_version; /* last compatible version */ - /* version 2 fields below */ - u32 boot_cpuid_phys; /* Physical CPU id we're booting on */ - /* version 3 fields below */ - u32 dt_strings_size; /* size of the DT strings block */ -}; - -struct ft_cxt { - struct boot_param_header *bph; - u8 *p_rsvmap; - u8 *p_start; /* pointer to beginning of dt_struct */ - u8 *p_end; /* pointer to end of dt_strings */ - u8 *p; /* pointer to end of dt_struct and beginning of dt_strings */ -}; - -void ft_begin_node(struct ft_cxt *cxt, const char *name); -void ft_init_cxt(struct ft_cxt *cxt, void *blob); -void ft_end_node(struct ft_cxt *cxt); - -void ft_end_tree(struct ft_cxt *cxt); -void ft_finalize_tree(struct ft_cxt *cxt); - -void ft_nop(struct ft_cxt *cxt); -void ft_prop(struct ft_cxt *cxt, const char *name, const void *data, int sz); -void ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str); -void ft_prop_int(struct ft_cxt *cxt, const char *name, int val); -void ft_begin(struct ft_cxt *cxt, void *blob, int max_size); -void ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size); - -void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end); - -void ft_dump_blob(const void *bphp); -void ft_merge_blob(struct ft_cxt *cxt, void *blob); -void *ft_get_prop(void *bphp, const char *propname, int *szp); - -#ifdef CONFIG_OF_BOARD_SETUP -void ft_board_setup(void *blob, bd_t *bd); -void ft_cpu_setup(void *blob, bd_t *bd); -void ft_pci_setup(void *blob, bd_t *bd); -#endif - -#endif -- cgit v1.1 From e489b9c078e22b0d9e75f002cd2a1bd967e88f5e Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Tue, 10 Jun 2008 11:06:17 -0500 Subject: fdt: unshadow global working fdt variable differentiate with local variables of the same name by renaming the global 'fdt' variable 'working_fdt'. Signed-off-by: Kim Phillips --- include/libfdt_env.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libfdt_env.h b/include/libfdt_env.h index ab5c301..a7fd2f8 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -31,7 +31,7 @@ #include #include -extern struct fdt_header *fdt; /* Pointer to the working fdt */ +extern struct fdt_header *working_fdt; /* Pointer to the working fdt */ #define fdt32_to_cpu(x) __be32_to_cpu(x) #define cpu_to_fdt32(x) __cpu_to_be32(x) -- cgit v1.1