
Grant Likely wrote: [...]
-#if defined(CONFIG_OF_FLAT_TREE) -#include <ft_build.h> -#endif +#ifdef CONFIG_OF_LIBFDT +#include <libfdt.h> +#include <libfdt_env.h> +#include <fdt_support.h>
ditto.
+#endif /* CONFIG_OF_LIBFDT */
do the includes need such protection?
There are a number of 5200 boards that haven't been migrated to support fdt yet, so I left the protection in. I suppose it can be removed.
Ignore this comment; I was on crack.. Of course the protections are not needed for the board specific code. I'll fix.
Could similar protections around ft_board_setup() definition in board-specific code be removed as well? I'm thinking about:
#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_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
Regards, Bartlomiej