From 4280342adb2d72d6242ec1ffbb723af380b31586 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Wed, 24 Jan 2018 20:47:09 +0300 Subject: fdt: Implement weak arch_fixup_fdt() Only ARM and in some configs MIPS really implement arch_fixup_fdt(). Others just use the same boilerplate which is not good by itself, but what's worse if we try to build with disabled CONFIG_CMD_BOOTM and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was apparently implemented in arch/xxx/lib/bootm.c. Now with weak arch_fixup_fdt() right in image-fdt.c where it is used we get both items highlighted above fixed. Signed-off-by: Alexey Brodkin Cc: Daniel Schwierzeck Cc: Simon Glass Cc: York Sun Cc: Stefan Roese Reviewed-by: Tom Rini Reviewed-by: Daniel Schwierzeck --- arch/mips/lib/bootm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/mips') diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 5a9a2811ff..9dc4740768 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -253,17 +253,15 @@ static int boot_reloc_fdt(bootm_headers_t *images) #endif } +#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) int arch_fixup_fdt(void *blob) { -#if CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && CONFIG_IS_ENABLED(OF_LIBFDT) u64 mem_start = virt_to_phys((void *)gd->bd->bi_memstart); u64 mem_size = gd->ram_size; return fdt_fixup_memory_banks(blob, &mem_start, &mem_size, 1); -#else - return 0; -#endif } +#endif static int boot_setup_fdt(bootm_headers_t *images) { -- cgit v1.2.3