]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
spl: fdt: support for fdt fixup for falcon boot
authorB, Ravi <ravibabu@ti.com>
Tue, 18 Apr 2017 11:57:26 +0000 (17:27 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 02:04:26 +0000 (22:04 -0400)
Adding support for fdt fixup to update the
memory node in device tree for falcon boot.

This is needed for single stage or falcon
bootmode, to pass memory configuration to
kernel through DT memory node.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
arch/arm/lib/Makefile
arch/arm/lib/bootm-fdt.c
common/Makefile

index 6e96cfb0c5dd41a8bd87b26084b8f91a9543997c..53d4ed2bc628c91867c37790d9c23373f1ae9f33 100644 (file)
@@ -33,6 +33,7 @@ obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 else
 obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
+obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 endif
 obj-$(CONFIG_$(SPL_)USE_ARCH_MEMSET) += memset.o
 obj-$(CONFIG_$(SPL_)USE_ARCH_MEMCPY) += memcpy.o
index d84789c7a8a458af5903ae694db597d458a3f2cb..eaa817b9ac8ef08877cc1652a5fc1ee1e4aefecf 100644 (file)
@@ -27,8 +27,10 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int arch_fixup_fdt(void *blob)
 {
+       int ret = 0;
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_OF_LIBFDT)
        bd_t *bd = gd->bd;
-       int bank, ret;
+       int bank;
        u64 start[CONFIG_NR_DRAM_BANKS];
        u64 size[CONFIG_NR_DRAM_BANKS];
 
@@ -42,9 +44,11 @@ int arch_fixup_fdt(void *blob)
 #endif
        }
 
+#ifdef CONFIG_OF_LIBFDT
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
        if (ret)
                return ret;
+#endif
 
 #ifdef CONFIG_ARMV8_SPIN_TABLE
        ret = spin_table_update_dt(blob);
@@ -57,6 +61,7 @@ int arch_fixup_fdt(void *blob)
        ret = psci_update_dt(blob);
        if (ret)
                return ret;
+#endif
 #endif
 
        return 0;
index 86225f1564bf2a30ef17c41d6464f5fb825859a6..bcd2486ff5d34b11ef3e2415bbcef6c962a81c8a 100644 (file)
@@ -95,7 +95,7 @@ obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
 obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
-obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o
+obj-$(CONFIG_SPL_OF_LIBFDT) += fdt_support.o
 ifdef CONFIG_SPL_USB_HOST_SUPPORT
 obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
 obj-$(CONFIG_USB_STORAGE) += usb_storage.o