]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
dt/fdt: add empty versions of early_init_dt_*_memory_arch
authorRob Herring <robh@kernel.org>
Fri, 19 Jun 2015 01:35:46 +0000 (20:35 -0500)
committerRob Herring <robh@kernel.org>
Fri, 19 Jun 2015 01:35:46 +0000 (20:35 -0500)
With the addition of commit 0166dc1 (of: make CONFIG_OF user
selectable), architectures which don't enable memblock and don't
have their own early_init_dt_*_memory_arch implementations will break
when CONFIG_OF is enabled.

Really, we should have better separation of CONFIG_OF and
CONFIG_OF_EARLY_FLATTREE, but doing that will require quite a bit of
shuffling of architecture code. That will have to wait for another day.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
drivers/of/fdt.c

index 9628c4a77f76e55f74e43bc9b720603946569459..0e314ba1f9854d4f806dddfa221be81976ef5167 100644 (file)
@@ -1015,6 +1015,11 @@ void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align)
        return __va(memblock_alloc(size, align));
 }
 #else
+void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
+{
+       WARN_ON(1);
+}
+
 int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
                                        phys_addr_t size, bool nomap)
 {
@@ -1022,6 +1027,12 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
                  &base, &size, nomap ? " (nomap)" : "");
        return -ENOSYS;
 }
+
+void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+       WARN_ON(1);
+       return NULL;
+}
 #endif
 
 bool __init early_init_dt_verify(void *params)