
On Wed, Apr 09, 2014 at 12:20:43PM +0900, Masahiro Yamada wrote:
Hi Nobuhiro, Tom,
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c index e40691d..8da9dac 100644 --- a/arch/arm/lib/bootm-fdt.c +++ b/arch/arm/lib/bootm-fdt.c @@ -18,6 +18,7 @@ #include <common.h> #include <fdt_support.h>
+#ifndef CONFIG_FDT_IGNORE_FIXUP_MEMORY_NODE DECLARE_GLOBAL_DATA_PTR;
int arch_fixup_memory_node(void *blob) @@ -34,3 +35,4 @@ int arch_fixup_memory_node(void *blob)
return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS); } +#endif /* CONFIG_FDT_IGNORE_FIXUP_MEMORY_NODE */
I am not happy about defining CONFIG macro to disable some code.
Please do
#ifdef CONFIG_FDT_FIXUP_MEMORY_NODE ..... #endif
rather than
#ifndef CONFIG_FDT_IGNORE_FIXUP_MEMORY_NODE ..... #endif
We expect most of boards should be fixed-up by U-Boot. So, add
#define CONFIG_FDT_FIXUP_MEMORY_NODE
to include/config_defaults.h
and
#undef CONFIG_FDT_FIXUP_MEMORY_NODE
only to boards for which you want to skip memory fix-up.
Agreed.
Basically, we should not use CONFIG macros for negation.
CONFIG_SKIP_LOWLEVEL_INIT, CONFIG_SYS_DCACHE_OFF, are examples of bad macros.
Lets hold off on fixing these until we're farther along with the conversion to Kconfig. Unless it'll be really problematic not to.. Thanks!